These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Exporting PDF Form data to Excel

gmeadows
Registered: Mar 16 2010
Posts: 5

From Acrobat, I do the following:

Select Forms->Manage Form Data->Merge Data Files into Spreadsheet.

I then select the Add Files Button and select the file name of my PDF form and then click Export.

Next I save the file as XML. I open the XML file and see all of the data that was in my form.

I open Excel and Select Data->Import External Data->Import Data and then locate my XML file.

All fields in my PDF form are now in my Excel spreadsheet cells except for the last piece of form data.

If my XML file has all of the data listed in my form, why doesn't all of the data end up in Excel?

Thanks in advance for any assistance...

My Product Information:
Acrobat Pro 9.3.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Excel has some wierd import issues. You should be able to see if it is going to miss something in the import wizzard in Excel, before the actual import happens. It could be an issue with line ending, column naming, or the column delimiter. Check all of these and how Excel is dividing up the columns.

Try just opening the xml file with Excel, not importing, and see what happens.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

gmeadows
Registered: Mar 16 2010
Posts: 5
Hi all,

What I had to do was to open the XML file in Excel that was created earlier by Acrobat and open it as an XML Read Only Workbook. Then I could see the data in each cell. One thing I was unable to do was to order the form fields as they appeared in Excel's column structure. Any ideas? In Acrobat's form editor, I shuffled the fields around but it had no affect on what was seen in Excel.

If I wanted to automate this process, would I need to use LiveCycle or could I just use Acrobat using JavaScript in either case?

The steps I want to accomplish are shown here:

1) Open a form
2) Fill out the form
3) Create a folder called Folder 1 and do a Save As on the form to save it in the new folder
4) Write all of the forms data into an Excel spreadsheet
5) Repeat this process and create Folder 2, etc.
6) Each time the process repeats, I want to append a new row of data into excel representing the next form's data

THANKS
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can connect a PDF form directly into an Excel SpreadSheet, and add and modify data. You can do this in either forms technology, Acrobat or LiveCycle, by using JavaScript.

I've got some articles on this here, but its not complete, and to see the full content you have to be a member:
http://www.pdfscripting.com/public/department48.cfm

However, what you can't do with JavaScript is create a file folder. To do this you'd need to write an external program that talks to Acrobat through the IAC interface. In fact, to do the complete automation you've described you might be better of doing the entire automation in a VB program that talks to Acrobat through the IAC. You'll find the info you need in the Acrobat SDK,
which you can download here:
http://www.adobe.com/devnet/acrobat/?view=downloads

Or you might want to do a hibrid solution, both VB and JavaScirpt, which can be very efficient and much easier to develop than using one technology alone.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script