How to Export Multiple Acrobat Checkboxes into a Semicolon-Separated Value
Question details
The user needs to combine the labels of multiple selected checkboxes in a PDF form into a single semicolon-separated text string for data export.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Customizing the form data export process to output a specific non-standard CSV format by merging checkbox data.
- Observed behavior
- Standard export tools do not support combining multiple checkboxes into one semicolon-separated custom format, requiring a script-based workaround to generate and attach the data.
Ensure you have access to the 'Prepare Form' tools in your PDF editor and a basic understanding of Adobe Acrobat JavaScript formatting.
Use Acrobat JavaScript to Compile and Attach the Custom String
Since Acrobat cannot automatically export a custom non-CSV format directly to the user's hard drive, you can build the string with JavaScript and attach it to the PDF using doc.createDataObject().
A semicolon-separated list of checkboxes combines multiple values into the same row or variable. Because this is technically a custom format and not a standard CSV file, Acrobat's default export features will not process it automatically.
Due to security restrictions, Acrobat cannot write an arbitrary custom-format file directly to the local file system. The most effective workaround is to compile the data using JavaScript and generate the custom string as an embedded text file attachment, which the user can then save manually.
Open your interactive PDF form in Acrobat and select the 'Prepare Form' tool from the right-hand pane.
Add a new Button to the form that users will click to trigger the custom export.
Double-click the button to open its Properties. Go to the 'Actions' tab, select 'Run a JavaScript' from the 'Select Action' dropdown menu, and click 'Add'.
In the JavaScript editor, write a script that iterates through your specific checkboxes, checks if their values are not 'Off', and concatenates their labels or export values into a single string variable, separated by semicolons.
At the end of your script, use the doc.createDataObject({cName: 'export_data.txt', cValue: yourStringVariable}) method. This will attach the semicolon-separated string to the PDF as a text file.
Instruct users to open the 'Attachments' pane in their PDF viewer and save the generated 'export_data.txt' file to their desired local folder.

Manage Interactive PDF Forms Seamlessly with WPS PDF
If you are looking for an intuitive way to handle PDF forms, fillable fields, and standard data extraction without wrestling with complex scripts, WPS Office offers a fast, lightweight, and user-friendly PDF editor.
- 1. Open your PDF: Launch WPS Office and open your interactive PDF document using the WPS PDF tool.
- 2. Navigate to the Form tab: Click on the 'Form' tab on the top ribbon to access the interactive form tools and settings.
- 3. Manage form fields: Click on checkboxes or text fields to adjust their properties, default values, and standard export behaviors.
- 4. Extract or save data: Fill out the required fields and use the built-in save or standard export features to manage your form data securely.

Frequently Asked Questions
Why does Acrobat block direct exports of custom CSV files to my computer?
For security reasons, Acrobat JavaScript operates in a restricted sandbox. This prevents potentially malicious scripts from secretly writing arbitrary data or executable files directly to a user's hard drive. Any file generation must either be attached to the PDF or utilize folder-level trusted workflows.
Is a semicolon-separated value the same as a CSV file?
No. A standard CSV (Comma-Separated Values) file typically uses commas to delineate different columns of data. Grouping multiple checkbox selections into one semicolon-separated string puts all that data into a single custom variable or row format, rather than standard columns.
Can I export standard form data without writing JavaScript?
Yes. Most modern PDF editors, including Adobe Acrobat and WPS PDF, allow you to export standard form data directly via the 'Export Data' menu option. This automatically packages the form fields into standard XML, FDF, or basic CSV formats without requiring manual scripting.




