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

How can I copy a formated Excel table to auto-fill a Fillable PDF?

Community Beginner ,
Nov 08, 2021 Nov 08, 2021

Copy link to clipboard

Copied

I created an Excel VBA script to create a table that is in the same format as a fillable tax spreadsheet. I would like to copy the cells from Excel to the fillable tax spreadsheet, but when I try to manually paste the Excel table into the Adobe PDF, it pastes into one cell instead of all the cells. How can I fix this?

 

I have attached the fillable pdf and my Excel data. I would like to paste the Excel table into the large table on the second page of the pdf.

 

Eventually, I would like to script this in VBA, but I want to know how to do it manually first.

 

Thank you.

TOPICS
Acrobat SDK and JavaScript

Views

1.1K

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 ,
Nov 08, 2021 Nov 08, 2021

Copy link to clipboard

Copied

May be possible with the VB-Javascript interface.

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
LEGEND ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

Possible as in "perhaps the pasted data could be programmatically parsed, split and assigned to appropriate fields". But I don't think so. 

Certainly nothing you can do manually; you can put form fields in a grid in Acrobat, but there is no row or column relationship. They might look the same, but they need a completely different worldview. 

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 Beginner ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

Does Acrobat have any way to reference a specific cell, like can I rename the cell fields in Acrobat somehow and then use those field names in VB?

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 ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

There are no "cells" in Acrobat, only fields. You can refer to them in your code using their name.

And there is no way to directly rename them using a script, no.

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 Beginner ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

I did some research and it seems like I can use Javascript to fill the form. However, I am running into another issue. How can I see the field names in the PDF? I am trying to Edit the file, but it says that it is locked.

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
LEGEND ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

You can get the field names using the form editor in Acrobat. Or by iterating them in JavaScript. DO NOT use the Edit function, use Prepare Form.

If the file has security set, everthing may be impossible, however. Check this before wasting more time.

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 Beginner ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

Thanks!

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 Beginner ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

LATEST

I almost have it solved. I used VB to create several XML files from my database, which I tested importing in Adobe Acrobat Reader using Edit -> Form Options -> Import Data. The XML files successfully populate the form.

 

Since I have over a hundred of these forms to fill out, I am now writing a Javascript program to automate the process of importing the XML files into the PDF files. I am able to generate and iterate through the XML and the PDF files; however, I do not know how to import the data from the XML files into the PDF files.

 

Is there a Javascript function that would be able to automatically import the provided XML file into the provided PDF file?

 

Thanks!

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