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

Import text from Excel to PDF : one cell per page

New Here ,
Dec 20, 2021 Dec 20, 2021

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!

TOPICS
Create PDFs , Edit and convert PDFs , JavaScript
2.1K
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 ,
Dec 20, 2021 Dec 20, 2021

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?  

 

 

 

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
New Here ,
Dec 22, 2021 Dec 22, 2021

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 🙂

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 ,
Dec 22, 2021 Dec 22, 2021
LATEST

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. 

 

 

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