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

tryin to have javascript grab info from excel and fill out pdf.

New Here ,
Apr 18, 2024 Apr 18, 2024

Hi, I am at a loss. I am trying to have javascript use the info from a text box to search an excel file with muitiple tabs at the bottom. Then return the dat of last inspection into a a text box on pdf and the last grade in anothor text box. So below is a few snipits of what i am trying to do. I want to use the rig line to search the excel file and grab the last (inspection date) BOPE date and grade.  I am generally pretty good with adobe and javascript and excel but at a loss on this one. PLEASE HELP if you can.

rig info line.PNGexpand image

 

date and grade on pdf.PNGexpand image

 

rig grade snipit from excel.PNGexpand image

 

 

 

  

 

TOPICS
Al Assistant , Edit and convert PDFs , How to , JavaScript , PDF , PDF forms
347
Translate
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 18, 2024 Apr 18, 2024
LATEST

Acrobat cannot read an Excel file directly. In fact there aren't any built in tools, or even 3rd party tools that fit the requirements you've described. 

However, it is possible to create such a tool with an Acrobat Automation Script. 

First though you'll need to save the Excel sheets to a text format such as CSV. Ideally, the entire workbook should be saved to a single  file format, such as XER, that can handle multiple sheets. But if you'll need to save the sheets that are needed separtely. 

Writing such a script is non-trivial. You can read about Acrobat Automation Scripts here:

https://www.pdfscripting.com/public/Automating-Acrobat.cfm

 

Alternatively you can use the Acrobat IAC to write a VBA script in Excel that opens the PDF form and fills it with the appropiate information. 

Here's the IAC Reference:

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/interapp/index.html

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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