Skip to main content
New Participant
June 18, 2012
Answered

Importing or copying Excel list into drop down list

  • June 18, 2012
  • 5 replies
  • 81009 views

Can anyone help me with this??  I have a list of 115 departments that I would like to populate the drop down box in an acrobat pdf form and dont have the time to enter them one by one..  Is it possible to either import this list or do a copy and paste??  Please help..  Thanks so much!!

Correct answer George_Johnson

Here's a link to a very simple PDF that demonstrates how you can populate a combo box (aka drop down) with a list of items that can be pasted into a text field, after copying them from Excel (or some other source): https://acrobat.com/#d=sIJoabh12oYOY19AuTZ9yw

The idea is that once the drop-down is populated after clicking the "Populate combo box" button, you can copy & paste the field to your form. Be sure to check for duplicates and blank lines.

5 replies

emcgorty
New Participant
February 1, 2018

Hi, George,

This Acroscript is great! I wondering how to use this hack in Adobe Acrobat DC Pro. I'm in Prepare Form --> Dropdown properties. I've copied my list from the form you created, but where would I paste this data in the Dropdown properties?

Please let me know if you need more information. I'm using Pro DC on a Windows OS.

Thanks!

Cheers,

Elizabeth

Thom Parker
Community Expert
February 1, 2018

First off , this isn't a hack. It's just list programming with Acrobat JavaScript.  populating any type of PDF list with data is very simple.

I haven't seen Georges sample, but if he's filling data from items pasted into a text field, then there are no properties on the drop down that need to be adjusted. Instead the data is loaded by pressing a button. The code on the button must be something like this

this.getField("DropDown").setItems(this.getField("TextField").value.split(/\s*/g));

Where "DropDown" is the name of the dropdown list and "TextField" is the name of the text field where the excel data is pasted.

The idea of Georges from is that you use it to create a filled droplist, then copy that dropdown onto your own form.

Here are some articles that explain list programming:

https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm

https://acrobatusers.com/tutorials/js_list_combo_livecycle

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
emcgorty
New Participant
February 1, 2018

Um, okay.

I'm not savvy enough to try and use JavaScript in Acrobat, I've added a Dropdown list (via Prepare Form) in Pro DC. When that Dropdown list is selected on the form, in Dropdown properties --> Options, there is an Item field to add data to create the dropdown list. I don't want to add them manually, as there are several, I want to batch add.

Perhaps this is not possible without scripting, but, from what I've read here in the forums, George's form appears to be what I need (I think). I thought by adding text to his script, I could copy that into my form.

But in Dropdown properties --> Options, there is no where for me to paste that much text. It appears that you can only add one item at a time to populate the list. I'm not sure what I'm missing...

Again, I don't want to do this via Java (if that's possible). I'd rather do it GUI-style...

New Participant
September 3, 2016

hello,

i want to imrport a list from excel that contains two columns, one with the value that i want to appear in the drop down list and the another one with de export value.

do you know how to do this?

elizabetht22312932
New Participant
February 17, 2016

The link in your post only takes me to a page to buy Adobe DC!! I've tried it several times, and all I can get is a big fat page to buy buy buy.  Grrrrrrrr!!!

Inspiring
February 17, 2016

Here's a new link to the sample form: http://acroscript.net/pdf/demos/comboPopulateTest.pdf

In practice, I use something else that I've developed that is more useful and a lot more efficient. Feel free to contact me by email if interested: acroscript at gmail dot com

elizabetht22312932
New Participant
February 17, 2016

I appreciate that, but I'm on a temp job (I'm retired and only come back

for 3 months during the admissions process), and will only be creating ONE

form, so it is not feasible for me to spend $50 to create one form. I have

a list of 71 colleges and a list 270 countries that I need to import. I

already did the colleges, I guess I'll have to do the countries too.

Thanks anyway.

On Wed, Feb 17, 2016 at 1:50 PM, George_Johnson <forums_noreply@adobe.com>

New Participant
January 9, 2015

Hi all

This PDF seems to have disappeared from the internet! Is anyone able to help out with this same issue?

Cheers!

George_JohnsonCorrect answer
Inspiring
June 18, 2012

Here's a link to a very simple PDF that demonstrates how you can populate a combo box (aka drop down) with a list of items that can be pasted into a text field, after copying them from Excel (or some other source): https://acrobat.com/#d=sIJoabh12oYOY19AuTZ9yw

The idea is that once the drop-down is populated after clicking the "Populate combo box" button, you can copy & paste the field to your form. Be sure to check for duplicates and blank lines.

drphil120Author
New Participant
June 18, 2012

Thanks for your response George!  I still dont understand how to get it back into the drop down list.  It doesnt allow you to paste all the list..  Its just pastes the very first line of the list..  What am I doing wrong??

Inspiring
June 18, 2012

Where you able to use the form to populate the drop down that it contains? If so, you're then supposed to then copy & paste the actual field (the entire thing) from the demo form to your form. You can then change it's appearance to suit your needs.