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

Script for data merge?

New Here ,
Sep 25, 2015 Sep 25, 2015

I am working on a complex document to create labels for various clothing items. The document is linked to a .cvs file with a lot of data fields, and the total number of data items (or pages that will be created when merged) is around 16,000 pages. Everything is set up to merge correctly as far as I know, but the issue I'm having is that each different clothing style is designed as a different color (so all the data fields would be a different color on every page). I know I could make changes to the source document and have multiple master pages, but that's just not feasible with the thousands of different items. Ultimately I would end up with thousands of merged documents which is just not doable. The only other method I'm seeing is to merge the one document and then make color corrections to every page (again thousands of pages to go through, so not very efficient!) Is there a way to add a script to the .csv file to indicate which items should be which color that will override the indesign target document color setting?

TOPICS
Scripting
3.0K
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
LEGEND ,
Sep 26, 2015 Sep 26, 2015

Interesting!  Screenshot, please!  😉

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 ,
Sep 28, 2015 Sep 28, 2015

Screen Shot 2015-09-28 at 8.12.07 AM.pngScreen Shot 2015-09-28 at 8.11.13 AM.png

So here is an example; this is from the merged document. The size that is written in magenta is what needs to change; the color should match the colored bar on the left. Is there a way to indicate that in the .csv file that you know of? I am pretty new to using data merge; I've only used it for basic uses so I'm not too familiar with how to set up the .csv file.

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
Explorer ,
Sep 26, 2015 Sep 26, 2015

e.g. on Page 1 to 3 you what to have color#1 on labels

on Page 4 to 5 you what to have color#2 on labels

??

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
LEGEND ,
Sep 26, 2015 Sep 26, 2015

A "label" little screenshot could be helpful!  😉

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
Contributor ,
Sep 26, 2015 Sep 26, 2015

Hi przemek, do you have anything in the csv file that identifies the colour for each specific label? If so then it would be a easy property to apply through a script.

If it isn't in the csv then a random or sequential list of colours could be applied.

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 ,
Sep 28, 2015 Sep 28, 2015

Is there a way to indicate the color in the .csv file? I don't have anything like that yet, but it sounds like that's the best way to accomplish this. I'm pretty new to using the data merge feature; could you explain how to add that to the .csv and apply a script?

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
LEGEND ,
Sep 28, 2015 Sep 28, 2015

How many colors have you?  😉

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 ,
Sep 28, 2015 Sep 28, 2015

There are 13 different colors. But like I mentioned originally, there are thousands of items, so when I create the merged document, I'd have to go through every page and change that text box that says what size the clothing is to the correct color. Do you know of a way to do this with a script from the csv file? I am pretty new to using the data merge feature and don't really know anything about scripts. Could you explain how to do that if there is a way to incorporate it into the csv?

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
LEGEND ,
Sep 28, 2015 Sep 28, 2015

I think it's very simple to play!  [good news!]  😉

What is your source file? Excel?

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 ,
Sep 28, 2015 Sep 28, 2015

Yes, excel is my source file saved as a .csv

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
LEGEND ,
Sep 28, 2015 Sep 28, 2015

OK! So, it's very simple to play.

In Excel, add a new column to define colors and a second column to make a concatenation [ColorXX_…]

sample: 100% Cotton => Color01 [Cyan60%]

In ID, play as with a simple grep style and a simple regex x 13 times (for each color).

Create the 13 regex and put it in a Multi-Find/Change set.

So play the game in … 1 click!  😉

Capture d’écran 2015-09-28 à 19.53.56.png

Capture d’écran 2015-09-28 à 19.54.12.png

Capture d’écran 2015-09-28 à 19.54.34.png

Capture d’écran 2015-09-28 à 19.55.49.png

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 ,
Sep 28, 2015 Sep 28, 2015

Thanks for your help with this issue. I'm not quite understanding 100%...I'm very new to using data merge and have never used grep styles or regex so I haven't been able to make this work yet but I'm getting close. Can you help me with the formula for the source file? Here is a screenshot of it. So the cells that need to change colors are:

      

SIZES1S2S3S4WAISTMEASUREMENTS

Screen Shot 2015-09-28 at 12.34.14 PM.png

 

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
LEGEND ,
Sep 28, 2015 Sep 28, 2015

It's simple too to make formulas in Excel! Have you already done it?

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 ,
Sep 28, 2015 Sep 28, 2015

No, I haven't done it in excel yet, I don't understand how to write the formula. This is the error I'm getting with the formula I've tried. I'm not sure why it's not working.

Screen Shot 2015-09-28 at 1.04.14 PM.png

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
LEGEND ,
Sep 28, 2015 Sep 28, 2015

Can you send me your Excel file with only the 2 first lines? I'll write for you what you'll need as Formulas, columns, …

Just for you to copy and paste your data in the modified Excel file after I send it to you in return! Easier to help you!  😉

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 ,
Sep 28, 2015 Sep 28, 2015

Here is a sample of my source file; just the first few lines.

Thanks so much for your help! Sorry I don't understand much....I'm still

pretty new to the data merge feature.

On Mon, Sep 28, 2015 at 1:12 PM, Obi-wan Kenobi <forums_noreply@adobe.com>

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
People's Champ ,
Sep 28, 2015 Sep 28, 2015

Hi  Tyson,

16k pages…You should definitively consider EasyCatalog. That would make your life far easier

FWIW,

Loic

www.ozalto.com

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 ,
Mar 09, 2016 Mar 09, 2016

Obi-Wan Kenobi, you have almost completely solved a long-standing issue that I have but you've left me sitting on the edge of my seat with anticipation. Could you please share the Excel formula you created for tylyn? I Googled until my eyes were bleeding before I decided to ask you but I can't find exactly what works. Thank you so much for your help!

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
LEGEND ,
Mar 10, 2016 Mar 10, 2016

Hi,

I've forgotten what I've done for tylyn! What do you want to do yourself?

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 ,
Mar 10, 2016 Mar 10, 2016
LATEST

I need to do the same thing that tylyn was asking about- change the text color in various Excel (.csv) cells that will translate through data merge for InDesign. I would really like to use your Excel concatenation technique but I cannot figure out the right formula to use to make that happen.

I'm attaching a screencap to show you what I'm looking to do. I removed 20+ columns that are unrelated to this question so this is a dumbed down version of my original .csv file. If you could just get me started on the formula then I can change the variables as needed. Excel is not my strong suit so I am stuck on the concatenation formula. I know I'm not going to color code the actual words in Excel, I just did it this way to show you the approx. colors that they need to be.


I have been frantically trying to figure this out before I head out of town for a long weekend but it just didn't happen. If you would be so kind as to get me started then I would really appreciate it. I will back in town in a couple of days so I'll check back then. I just wanted to let you know this so you don't mistake my lack of response as lack of appreciation for your help.


Screencap.jpg




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 ,
Sep 28, 2015 Sep 28, 2015

That is exactly right; A few pages will have one color which coordinates with a certain clothing style; then the next few pages will be another color indicating a new style. Here is a screenshot (the size that is written in magenta is what I'm trying to change to match the colored bar on the left).

Screen Shot 2015-09-28 at 8.12.07 AM.pngScreen Shot 2015-09-28 at 8.11.13 AM.png

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