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

Using Excel to populate an Adobe form

dandanthefordman
Registered: Jun 10 2009
Posts: 5
Answered

Is there a way to have an adobe form pull data from Excel and fill its self out? Or is there a way to export data from Excell and then somehow get that data into a form? Any ideas are appreciated.

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, there are two ways for importing data into a PDF from a local excel file.

1. Convert the Excel file into a ".txt" tab delimited file. Then the data can be imported using the "Forms > Manage Form Data > Import..." menu item or automated with the "doc.importTextData()" fucntion in Acrobat JavaScript.2. If the Excel file has been set up properly, i.e. the table data needs to be grouped in a "Name". Then the excel file can be registered with ODBC and accessed through the "ADBC" object in Acrobat JavaScript.

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

dandanthefordman
Registered: Jun 10 2009
Posts: 5
I exported from excel to a .txt(tab deliminated) file. When I go to import that file into my form I am not given the option to import a .txt file, only XML. Any ideas why?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Ahhh, you didn't say you had a LiveCycle form. You can only import text (excel) data into an AcroForm. LiveCycle forms only accept XDP and XML formats.

Now it gets more complicated. So, to do this you'll need to group the Excel data by giving it a name, then registering the excel file with ODBC. That's all on the system side. Inside LiveCycle Designer you'll need to create a data connection in your form to the ODBC registered Excel file. and then add controls for acquiring the record you want out of the data.

Or you could convert your form to an AcroForm.

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

KateyJ76
Registered: Dec 13 2009
Posts: 1
Hi,

Please expand more on those methods mentioned?

A:
1 - "So, to do this you'll need to group the Excel data by giving it a name"
2 - "then registering the excel file with ODBC."
3 - "Inside LiveCycle Designer you'll need to create a data connection in your form to the ODBC registered Excel file."
4 - "then add controls for acquiring the record you want out of the data."

or

B:
"Or you could convert your form to an AcroForm."

Thanks,

Katey J
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You're A and B comments are correct. What do you mean by expand?

There are posts on this forum about connecting a LiveCycle form to a Data Source. There are also tutorials covering this topic at the Adobe LiveCycle site. Connecting to an Excel file is a special case.

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