Copy link to clipboard
Copied
I have created a fillable PDF form & now I need to import data from an excel sheet based on the selection of two different combo boxes. To be more specific, one combo box contains job category and other contains job level. Based on these selections the respective employee's salary amount and allowance amount should be imported into fillable PDF's text field for calculation from an excel sheet. Can someone shed some light to get an idea from where to start? I am a beginner in fillable PDF related javascript & I have very basic level of knowledge in this topic. Thanks in advance.
Copy link to clipboard
Copied
First of all, you can't import data from an xls(x) file directly. You have to first convert it to a plain-text file, like a CSV or a tab-delimited text file.
Secondly, reading the data from an external file is tricky and requires installing a script on the local machine of each user. The alternative is to embed the file as an attachment to the PDF and then read the data from it, but then updating it is much less straight forward, of course.
Copy link to clipboard
Copied
Thanks for your feedback. Will you be able to elaborate the method of "...installing script to local machine...". I'm interested to know.
Copy link to clipboard
Copied
It basically involves placing a .js file with the trusted function in a specific folder on the computer, the JavaScripts folder of the application, and then calling that function from the code in the file.