xmladobestylingadobe-indesigngrep-indesign

GREP Styles in Adobe InDesign


I posted a question a few days ago about importing data to an InDesign file from a MySQL database using XML. I have looked into it and thanks to some help received from other sources think the project should be fairly straightforward.

Essentially, we have a unique product ID which is 5 digits long. When importing it, we would like the last digits to be used as a colour for a barcode. Each digit will be assigned a colour (from 0-9), and the data will be presented in a table as follows:

12345
ROW 1 COLOUR
ROW 2 COLOUR
ROW 3 COLOUR

My question is, does anyone have experience with using GREP Styles within Adobe InDesign, and could explain how we might achieve this (i.e. setting the cell style of the cells according to the last two digits in the number)?


Solution

  • In general: Each cell is its own text story. With a simple GREP search you can not search for contents of multiple cells with one search, and you can not modify the style of one cell based on the contents of another cell or text outside of the table. You can of course accomplish this with some more advanced scripting or a plugin.

    I'm not quite sure if I'm answering the correct question as it's not clear what you are trying to accomplish. Maybe you could create some example input and output data clearly showing what text you want what style applied to.