I am using the drop-down list object. I have an excel spreadsheet with 100 items in the list. I want to import the list from excel, just once. It's static data and won't change. It's for a purchase req and the User just has to select their department.
How do I import the data from the excel spreadsheet into the dropdown list?
Thanks
Gillian
so here are a couple ideas,
1. Save the Excel data as an XML format, then modify it to match the List format in the LC Template. Then Copy it directly into the XML editor in LiveCycle Designer.
Or better yet. Save you're list as a Library component and then modify it. Now you'll be able to drag and drop your list onto any from.
2. Use a "data connection" to connect to the Excel file then read in all the entries directly into the Template Model. You'd use code similar to what's done in the "Data Drop-Down" in the Custom library. But instead of loading the entries into the "Form" model, load them into the "Template" model. To do this the JavaScript has to modify the XML, the regular list operations don't work.
Once the data is loaded, save the file, reopen it in LiveCycle and delete the data connection.
I hope this helps,
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/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script