Using script to open InDesign file and update table data from an excel document

New Here ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

Hello,

 

My company makes data reports that are often replicated a couple hundred times. I've created a document that has table data attached to an excel file and can be updated through the links panel. My question is, is there a way to update the data in the tables just by running a script, pointing to the excel file within the same folder?

 

There are more complicated actions that need to be completed in the file, but this would be a great starting point!

 

Thank you in advance!

TOPICS
Import and export , Scripting

Views

100

Likes

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

correct answers 1 Correct answer

Guru , Jun 16, 2022 Jun 16, 2022
I wrote a function that reads the data from Excel and returns them in InDesign as an array of strings. I didn’t see your files, but off the top of my head, a possible approach could be like so: If your table structure matches the spreadsheet, it’s quite easy: you may simply replicate the data in InDesign. For example, row 2 in column 1 in InDesign matches cell B2 in Excel.Otherwise, you have to explicitly indicate the relationship between the cells in InDesign and Excel. For instance, in Excel, ...

Likes

Translate

Translate
Adobe Community Professional ,
Jun 16, 2022 Jun 16, 2022

Copy link to clipboard

Copied

Edit > Place and Link might give you the ability to update the main table and it would update in all the other documents that have a Place 'n' Link of that Table.

Another approach: build the table InDesign document and place it into a page in the other documents. A placed InDesign file acts as if it were an image.

Mike Witherell

Likes

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
Guru ,
Jun 16, 2022 Jun 16, 2022

Copy link to clipboard

Copied

LATEST

I wrote a function that reads the data from Excel and returns them in InDesign as an array of strings.
I didn’t see your files, but off the top of my head, a possible approach could be like so:
If your table structure matches the spreadsheet, it’s quite easy: you may simply replicate the data in InDesign. For example, row 2 in column 1 in InDesign matches cell B2 in Excel.

Otherwise, you have to explicitly indicate the relationship between the cells in InDesign and Excel.
For instance, in Excel, you may have a ‘key’ field, say, a unique ID. In InDesign, you label cells with corresponding IDs so the script would know where to put the data.

2022-06-17_09-07-26.png

Likes

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