Is it possible to automate the extraction of text from InDesign to Excel in a given order:
I have uploaded a source InDesign file with markups, see “InDesign2Excel_Input.indd”. The text is in one single text-frame and in cells as well.
I have manually copied and pasted the text from InDesign to Excel for this one, see “InDesign2Excel_Output.xlsx”
Files can be downloaded from here:
Can someone suggest a workflow to automate the process for 500+ pages. A script would be more helpful.
Thanks in advance.
As you know I didn't find my answers on InDesign Secrets, that's why I asked it again here.
Sure, it can be scripted. A couple of days ago -- being on vacation and having nothing to to -- I wrote a function that does the opposite: reads the data from Excel (everything from the first spreadsheet) and sends it to InDesign as array. Also, I made a new version of my Change fonts script which uses this function (so to say a practical example) which now reads data directly from Excel instead of CSV-file.
Soon I'm going to post them on my site.
In your sample, I see a big problem: all text is in the same text frame and both a paragraph and a character style is applied to it (the same styles to all text!). How can the script detect, in this case, which part of text should go to which column in the spread?
Ideally, you have to split the text into five separate frames and set labels to them (in the Script Label panel).
can u provide me link of your website ?
do u have script for indesign to excel ?
Kas, creating five separate frames and setting labels would be equal to copying and pasting the text from InDesign to Excel. I did a test run on the file by couple of team members and got an average of two minutes per page time. Making a total of 17 hours job. The only problem I see is, how I'll make sure that the copy and pasting has been done correctly. This doubt will force me to double check the data. Whereas a script will eliminate this process and I don't have to worry about anything, just a random check would be fine.
In total, I'm looking for a one click solution.
I don't think it's possible to do with a script in a file like you provided. It would be possible if you had applied different par/char styles to each section so the script could differentiate them.
I totally understand the complexity of the job that's why I posted it here, just to try my luck.
If the file had been styled properly, then I might have Map the Styles to Tag and exported it to XML and finally converted to Excel.
late but still 🙂 look for —- in your text.
JS can select all text on the page and copy to clipboard. Then use AHK to split text based on paragraphs characters (all indd file have to same layout – same numbers of paragraphs) here:
Inspired by our popular Rapid Assault Combat Shirt, the Rapid Response Half-zip is built from a high performance, quick-dry, two-way stretch polyester/spandex fabric that provides a snug and secure fit without bunching or rolling. An ideal bottom or mid layer, the Rapid Response features a moisture wicking finish that keeps you warm and dry, a secure zip pocket on the left arm, an embossed loop platform on the left arm, and stylish embroidered 5.11 branding.
—– HERE are first 2 paragraphs in a row = desctriptions
+ High performance two-way stretch fabric
+ Moisture wicking, quick drying
+ Zippered sleeve pocket at left bicep
+ Scope embossed loop platform on right bicep
—– HERE are 2 paragraphs in a row = find word “Overview” and all text until 2 paragraphs appear (AHK will put this text to excel – specific cell)
+ 92% polyester / 8% spandex torso
+ 91% polyester / 9% spandex sleeves, shoulders, and collar
+ Embroidered 5.11 branding
+ Also available in RealTree XTRA
—– HERE are 2 paragraphs in a row = find word “Specifications” and all text until 2 paragraphs appear
(All will be a buletts part – (AHK will put this text to excel – specific cell)
72415 Rapid Half Zip | 092 Storm, 190 TDU Green, 709 Regatta | S-2XL
62381 Women’s Rapid Half Zip | 018 Charcoal, 498 Blush, 831 Sage Green | XS-XL
72424 Realtree Rapid Half Zip | 302 RealTree XTRA | S-2XL
72444 Rapid Half Zip | 018 Charcoal, 120 Coyote, 831 Sage Green | XS-XL, XXL
…and so on all via GREP.
then AHK jump to another page and repeat the process.
so maybe in future projects 😉
Have u got solution of your issue ?