Hi all,
I want to export a form's text field data entered in Acrobat to Microsoft Excel automatically without all of the manual steps found below by simply clicking a button on the form to execute the process.
CAN I AUTOMATE THIS PROCESS USING JAVASCRIPT AND THE SCRIPT EDITOR IN LIVECYCLE?
Here I show the manual steps.
===============================================================
I have done the following in LiveCycle:
1. I have created a form in LiveCycle with a single text edit field.
2. I have saved the form file in LiveCycle as an XML(PDF) file.
3. I then close LiveCycle
-------------------------------------------------------------------------------------------------------------------
I have done the following in Acrobat.
1. Start Acrobat Professional and open the form that was created in LiveCycle.
2. Enter some text into the edit field, click anywhere on the form outside the text field and click Save.
3. Choose File > Form Data > Create Spreadsheet From Data Files.
4. Click Add Files and locate the XML (PDF) file you saved in LiveCycle.
5. Click Export and save the file as an XML file.
7. The Create Spreadsheet dialog box displays Done! when Acrobat has created the spreadsheet.
8. Click View File Now to open the spreadsheet file in your default application. You will see the XML file with the text you entered into the form.
9. Exit Acrobat Professional.
---------------------------------------------------------------------------------------------------------------
Next I opened Microsoft Excel and did the following:
NOTE: I can do all of this with a VBA script in excel where excel will read the XML file each time excel opens and update the spreadsheet that could be appended to data from a previous form entry.
1. Select the Menu item Data->Import External Data->Import Data and find the XML file you created.
2. From the Import Data dialog box, click Ok and you will see the text you entered in the Acrobat form in Microsoft Excel.
http://www.acrobatusers.com/events/2220/tech-talk-database-connected-forms
I gave a session on this topic at the 2009 PDF Central Conference. My slides might still be listed there. And I've written and recorded several videos on this topic, which you'll find at www.pdfscripting.com.
Connecting to an Excel file is a bit trickier than connecting to a true DB. You'll find some special info on this process here.
http://www.pdfscripting.com/public/department48.cfm
However, you must keep in mind that this is a local mechanism, it only works for your own computer. You've already got a pretty good setup for distributed forms. Using a VBA script to update submitted data files is a very good idea.
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