• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to conditionally import data from excel to fillable PDF using JavaScript?

New Here ,
Apr 02, 2022 Apr 02, 2022

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.

TOPICS
How to , JavaScript , PDF forms

Views

254

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2022 Apr 03, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 04, 2022 Apr 04, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2022 Apr 04, 2022

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines