Highlighted

Develop a script to extract specific data from Excel.

Participant ,
Jul 21, 2020

Copy link to clipboard

Copied

Greeting!

 

This community was a big help for the indesign project that I'm working on, Thanks a lot all! I'm facing now an issues and since I'm a developer not a desginer so I'm struggling. Anyhow, the problem is that the datamerge tool isn't working for the designers so they want a specifc items from excel sheet to be selected in assigned to any rectangle. However, I've manged to read the data from excel sheet but I didn't find any sources that describe how can I select a specific column and manuplate it. While using this method ,place( myExcelFile), all the excel sheet data are placed in one rectangle.

 

 

let me describe the case; 

The designers want to create a 6 rectangles and in each rectangle their will be insid it a bunch of items (2 or 3). Anyhow, the items going to be selected from the excel sheet. It's time consuming from them and I'm trying to help them.

 

I'm using Javascript. 

I hope there is any idea how can i catch specific data from the excel. 

 

 

Otherwise, you can reference the placed table like so:

myPlacedFile.tables[0].rows[1].cells[0].texts[0].contents;

or:

myPlacedFile.tables[0].cells.item("0:1").texts[0].contents;

The .texts[0] part deals with the possibility of overset text. Remember though that the .contents property of any text object is a JavaScript string that does not have formatting.

TOPICS
Feature request, How to, Import and export, Scripting, SDK, Type

Views

82

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

Develop a script to extract specific data from Excel.

Participant ,
Jul 21, 2020

Copy link to clipboard

Copied

Greeting!

 

This community was a big help for the indesign project that I'm working on, Thanks a lot all! I'm facing now an issues and since I'm a developer not a desginer so I'm struggling. Anyhow, the problem is that the datamerge tool isn't working for the designers so they want a specifc items from excel sheet to be selected in assigned to any rectangle. However, I've manged to read the data from excel sheet but I didn't find any sources that describe how can I select a specific column and manuplate it. While using this method ,place( myExcelFile), all the excel sheet data are placed in one rectangle.

 

 

let me describe the case; 

The designers want to create a 6 rectangles and in each rectangle their will be insid it a bunch of items (2 or 3). Anyhow, the items going to be selected from the excel sheet. It's time consuming from them and I'm trying to help them.

 

I'm using Javascript. 

I hope there is any idea how can i catch specific data from the excel. 

 

 

Otherwise, you can reference the placed table like so:

myPlacedFile.tables[0].rows[1].cells[0].texts[0].contents;

or:

myPlacedFile.tables[0].cells.item("0:1").texts[0].contents;

The .texts[0] part deals with the possibility of overset text. Remember though that the .contents property of any text object is a JavaScript string that does not have formatting.

TOPICS
Feature request, How to, Import and export, Scripting, SDK, Type

Views

83

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
Jul 21, 2020 0
Adobe Community Professional ,
Jul 21, 2020

Copy link to clipboard

Copied

Have a word with Kris at https://www.rorohiko.com/wordpress/custom-development/

He's friendly and I'm sure he'll be able to do what you want (if it's possible), for a fee of course!

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
Reply
Loading...
Jul 21, 2020 1
Participant ,
Jul 21, 2020

Copy link to clipboard

Copied

thanks for sharing that

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
Reply
Loading...
Jul 21, 2020 1
Guru ,
Jul 21, 2020

Copy link to clipboard

Copied

If you don't need to keep formatting, you can use this function which worked well for me in a few projects.

To reference objects (rectangle, text frames, etc.) by script, I label them manually (only once) and save the doc as a template (indt-file).

— Kas

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
Reply
Loading...
Jul 21, 2020 0
Participant ,
Jul 21, 2020

Copy link to clipboard

Copied

Thank you verymuch, I've seen your post and tried but it didn't work for me 😞 but i appreciate it thanks.

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
Reply
Loading...
Jul 21, 2020 0
Guru ,
Jul 21, 2020

Copy link to clipboard

Copied

Otherwise, you can reference the placed table like so:

myPlacedFile.tables[0].rows[1].cells[0].texts[0].contents;

or:

myPlacedFile.tables[0].cells.item("0:1").texts[0].contents;

The .texts[0] part deals with the possibility of overset text. Remember though that the .contents property of any text object is a JavaScript string that does not have formatting.

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
Reply
Loading...
Jul 21, 2020 0