[tool] Set form field properties from Excel

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Mathew
User
Posts: 794
Joined: Thu Jun 19, 2014 7:30 pm

[tool] Set form field properties from Excel

Post by Mathew »

This tool enables one to set most of the field properties using copy and paste from an Excel (or Open/Libre Office) spreadsheet.

Background
I don't think there's a built-in way to set more than the values of form fields from either a tab delimited or comma separated text file (if there is, please comment!) This tool allows you to set any number of arbitrary properties (such as the Tooltip, colors, visibility, etc) in addition to the value of fields.


Using the Tool
Once installed it will add a button to the Form ribbon (or menu) "Apply Excel Table…":
image.png
Running the tool opens up this dialog:
image(1).png
? opens a dialog with further information about the properties that can be used
Get Field Names opens a dialog with all the field names in the current document, in a format that can be pasted into a row in Excel.
Column Format/Row Format allows one to organize the spreadsheet data in columns (with the field names across the top) or in rows (with the field names down a column).

Copy the cells from the spreadsheet and paste them directly into this dialog. Press "OK" to apply the changes.


Installation
Detailed instructions here: viewtopic.php?p=196006#p196006
Extract the zip and save js files into the Javascripts folder
setFormData v1.1.zip

Example
I have a pdf with four form fields. I've set the name of two of them identically, so some properties applied to these fields will always be the same between them.
image(2).png
I then run the tool, and press [Get Field Names] to get all the field names, and paste them into Excel. After that, I've added some rows with information that I want to apply to the fields (this table is organized in "Column Format"):
image(3).png
Copy and paste this table into the dialog. It looks a bit messy, but so long as each cell is separated with a Tab (not spaces), it will work:
image(4).png
Press OK, and it updates all the fields:
image(5).png
BTW the same table, organized in Row Format would be:
image(6).png
Limitations/Bugs
  • Fixed in v1.1:None of the properties can include Tab or Newline - it will break the parsing of the data. It's on my todo list.
You do not have the required permissions to view the files attached to this post.
Last edited by Mathew on Fri Feb 06, 2026 8:07 pm, edited 5 times in total.
Mathew
User
Posts: 794
Joined: Thu Jun 19, 2014 7:30 pm

Re: [tool] Set form field properties from Excel

Post by Mathew »

This version parses tab delimited data better (handles quotes and newlines in the text). Also adds the option to organize the table by row or column.
setFormData v1.1.zip
Changes in v1.1
  • handle newline and tab in delimited data;
  • add option for row format
You do not have the required permissions to view the files attached to this post.
User avatar
Dimitar - PDF-XChange
Site Admin
Posts: 2672
Joined: Mon Jan 15, 2018 9:01 am

Re: [tool] Set form field properties from Excel

Post by Dimitar - PDF-XChange »

Thank you Mathew.