Skip to main content
dennisj21127041
Participant
June 14, 2018
Question

Is it possible to read an excel file using the calculation script in Adobe Acrobat?

  • June 14, 2018
  • 1 reply
  • 404 views

I have an excel file with over 60,000 numbers. I am trying to code in (using js) these numbers to autofill my pdf form when a user enters a certain number in a field. For example, if the user enters "9999999" into a field, four other fields automatically fill based on the number they entered. However, since the calculation script only allows a certain number of characters, I am unable to write this code (basically a if/then statement) for all 60,000 numbers. Is there a way I can keep these numbers in an excel file and have the calculation script read this file and put these numbers into an array?

This topic has been closed for replies.

1 reply

Legend
June 14, 2018

There used to be an ODBC connection feature in Acrobat but it was removed many years ago.

You can import plain text files using the ImportTextData() method, but to get it working in Reader requires the LiveCycle enterprise suite. Even in Acrobat it's a complex process as you need elevated permissions - installed scripts, not embedded functions.

The idea that some random PDF form can read the contents of a file from someone's computer is a very bad thing, and Adobe make it as difficult as possible.

dennisj21127041
Participant
June 15, 2018

Ah, will definitely be moving on to a different program. Thanks for the reply