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

Develop a script to extract specific data from Excel.

Participant ,
Jul 21, 2020 Jul 21, 2020

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 maniplate 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. 

 

 

TOPICS
Feature request , How to , Import and export , Scripting , SDK , Type
1.3K
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

correct answers 1 Correct answer

Valorous Hero , Jul 21, 2020 Jul 21, 2020

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.

Translate
Community Expert ,
Jul 21, 2020 Jul 21, 2020

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!

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
Participant ,
Jul 21, 2020 Jul 21, 2020

thanks for sharing that

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
Valorous Hero ,
Jul 21, 2020 Jul 21, 2020

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

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
Participant ,
Jul 21, 2020 Jul 21, 2020

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

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
Valorous Hero ,
Jul 21, 2020 Jul 21, 2020

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.

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 ,
Feb 11, 2024 Feb 11, 2024
LATEST

Dear Sir,

 

I am working as a designer but I am facing long time and mistakes for copy paste text from excel to indesign

Could you guide me to write a script for below

After paste the copied text in indesign I want to change font name, style and size for every line have different font name, style and size.

after this I want to line break of these lines into one line.

Please guide.

 

 

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