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

Importing XLS contents into gazillion text frames

Community Beginner ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Hi!

I have a huge leaflet with around 4000 different text frames (names, descriptions, prices of different products), and I need to translate it into couple different languages. I have translations in the XLS file, so I figured out I can import it and mass replace the content of the text frames. I did sth similar in Photoshop once, but it seems much more complicated in Indesign. So I need help:

  1. In Photoshop, from what I remember, you just define that that particular text field is 'named' for example 'TXT_VAR_1', and the other one is 'TXT_VAR_2', and than you can replace the content with data sets. But in Indesign there doesn't seem to be a way to 'name' a text field, am I right? So how do you define it?
  2. Also, I've read that data sets are replaced with data merge, but it works in a different way. For example in Photoshop my file that I imported look like that:
       TXT_VAR_1, TXT_VAR_2, TXT_VAR_3...
       sth1_in_en, sth2_in_en, sth3_in_en...
       sth1_in_pl, sth2_in_pl, sth3_in_pl...
    The first row are the names of the variables, the second are the contents in English, the third one in Polish, and so on. And those rows turn into data sets, which I can easily change. Is it possible to do it the same in Indesign?
  3. What about the pages/spreads. Do they limit the data merge? What I mean - can I mass replace the contents in the entire document, or just on one spread?

Thanks!

TOPICS
Scripting

Views

413

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 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

Hi there,

This can be done by script. Here I posted a function which gets data from Excel: only plain text without formatting.

I would create an InDesign template (indt-file) with labeled text frames (using the script label panel) so the script would know which data where to place.

— Kas

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 ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

This sounds awesome! I'm installing the script now, but just to make - from what I understood from the example described on the script page - the number in my case would be the language, and A, B, C... are the different data fields. So A1 is for example the name of the product in Polish, B1 is description in Polish, A2 is name in German, B2 is the description in German, and so on. So is it possible to mass switch between these languages?

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 ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

Another question - I've tried to use your script, but it stops at: http://prntscr.com/jpvt9f . The bottom error says sth like "inconsistency of types: 'matrix(...)'. I'm using Indesign CS6.

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 ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

And if I use the 2.0 version of the script - it does something, even excel opens for a second (and closes immediately) when I run the script, but I don't see any results and in JS console it says "Result: undefined"

PS. Sorry for third post in a row!

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 ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

LATEST

Moving to InDesign Scripting forum

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