Import text from Excel to PDF : one cell per page
Copy link to clipboard
Copied
Hello,
I have to copy-paste content from Excel sheets to PDF. There is one column in the Excel sheet that I need and each cell of that column corresponds to the content I need to add on one page.
For example: I copy the text from cell A1 to paste it to the top of page 1, the text from cell A2 to the top of page 2, cell A3 to page 3, etc. The text always goes to the same place on the page and is more or less the same length, but there are several pages.
I would like to know if there is a way to automatically import the data from the Excel sheet to the PDF document. Is there a way to do it in Adobe Acrobat DC whether it is with an existing action or with a short JavaScript that I could use?
Thanks for your help!
Copy link to clipboard
Copied
Acrobat cannot connect directly to Excel, but an Acrobat script can import data from a CSV or tab delimited text file. This is not a simple operation, especially since the imported data needs to be pasted on different pages.
You can find out more about importing data here:
https://www.pdfscripting.com/public/Form-Data-Handling.cfm#DataFormats
https://www.pdfscripting.com/public/ExcelAndAcrobat.cfm
What do you mean by "paste it to the top of page"? is there a form field a the top of each page?
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Thanks for your insight!
There is unfortunately no form field where I need to add content.
I receive a very plain PDF file and I need to add comments at the top of the page (comments that are in an Excel sheet for another purpose), before to forward it to someone else.
Is it clear?
Thanks again 🙂
Copy link to clipboard
Copied
You don't need a form field to do this. An Acrobat script can open a text file and read the contents. So you could write an automation script to add the comments, but it would require the data to be in a CSV, or other text based format.
Another option is to write a VBA script for Excell that uses the Acrobat IAC object to add the comments.
Unfortunately, either way requires some complext programming.
Use the Acrobat JavaScript Reference early and often

