Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 26, 2013, 01:40 PM   #1
alissat
macrumors newbie
 
Join Date: Mar 2013
Applescript to Export text from Indesign and import to Microsoft Excel.

Help, I am new to the applescript world.
I need to extract text from multiple pages of Indesign and import the text into Microsoft Excel.
I tried using Rorohiko Text Exporter which does extract the text and save the file to a text file, but when I import the file into Excel it puts all of the text in Column A and I need certain text fields to go to certain columns and rows. Since each text field is in its own text box within Indesign I cannot designate the file to be tab or comma delimited. They are separated only by line breaks.
So how do I designate certain text to certain columns and rows?

Any help would be greatly appreciated
alissat is offline   0 Reply With Quote
Old Mar 28, 2013, 11:21 AM   #2
macmesser
macrumors 6502
 
Join Date: Aug 2012
Quote:
Originally Posted by alissat View Post
Help, I am new to the applescript world.
I need to extract text from multiple pages of Indesign and import the text into Microsoft Excel.
I tried using Rorohiko Text Exporter which does extract the text and save the file to a text file, but when I import the file into Excel it puts all of the text in Column A and I need certain text fields to go to certain columns and rows. Since each text field is in its own text box within Indesign I cannot designate the file to be tab or comma delimited. They are separated only by line breaks.
So how do I designate certain text to certain columns and rows?

Any help would be greatly appreciated
You can append a tab to the value of any text variable simply with a statement like this (pseudocode):

tell inDesign
set theText to the text of textbox 1
set the text of text box 1 to theText & tab
end tell

I don't know if inDesign internally uses the tab char for tabbing or if you already have tabs in the existing text boxes. You might have to use some other delimiter or if you must export to tab delim, convert existing tabs to something else before appending tabs. If no tabs in the existing text boxes just append a tab.

Substituting one character for another in text is easy with plain vanilla Applescript by playing with "Applescript's text item delimiters".

Hope this is marginally helpful. I recently had a similar problem exporting custom field values from Extensis Portfolio in to Filemaker Pro.
macmesser is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Templates for Microsoft Excel - Best Excel Spreadsheets for Mac! Alexander-James Mac Applications and Mac App Store 1 Apr 24, 2014 01:19 AM
Import/export gw0gvq Windows, Linux & Others on the Mac 2 Dec 8, 2013 06:52 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 28, 2013 11:32 PM
Export Addresses To Excel Klew721 OS X 3 Apr 6, 2013 02:37 PM

Forum Jump

All times are GMT -5. The time now is 11:37 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC