Copy link to clipboard
Copied
Hi,
Is it possible to export InDesign Document to xls?If is it possible,then how to export InDesign Document to XLS using JavaScript?
I am able to convert only xml to xls.Please guide me.
My script is:
myXMLElement.exportFile(ExportFormat.xml, File("/c/partialDocumentXML.xls"));
Regards,
Revathi
Copy link to clipboard
Copied
Nope. That's not a possible export format. Once that said, one may loop through document's contents and output to a CSV file. The latter can then be opened in Excel.
Loic
www.ozalto.com
Copy link to clipboard
Copied
Hi Loic,
Thank You,
Copy link to clipboard
Copied
To avoid the extra step of creating csv-file, InDesign can interact with Excel directly via Visual Basic Script (on Windows) or Apple Script (on Mac).
Also, you can mix JavaScript (the most popular language in InDesign scripting) with VBS/AS (languages available for scripting other apps). If you're interested, see here for examples.
— Kas
Copy link to clipboard
Copied
Hi Kas,
I want to export my InDesign Document to excel.I think it is not possible.
Regards,
Revathi
Copy link to clipboard
Copied
Hi Revathi,
Obviously there's no "Export to Excel' option in the File > Export menu so it isn't possible to export the whole file directly.
But it is possible to send some data from inDesign to Excel.
Off the top of my head, here are a few ways:
Which of the above mentioned approaches suits your specific needs best is for you to decide. Anyway, I don't see what sort of documents you have -- a catalog, a table with with prices, etc. -- so can't give you more specific recommendations.
— Kas
Copy link to clipboard
Copied
Hi Kas,
I have to get a excel with product name and price. At first,I have got this from xml using TOC in a InDesign document.Now,I have to export this details from InDesign document to excel.I have to do this using javascript.I have got the InDesign document with product name and price using script(TOC).Now I have to export my document to excel.How can I do this by using script?Could you please guide me?
Regards,
Revathi