Skip to main content
revathiv80720177
Known Participant
May 15, 2017
Question

InDesign Document to Xls

  • May 15, 2017
  • 1 reply
  • 4204 views

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

This topic has been closed for replies.

1 reply

Loic.Aigon
Legend
May 16, 2017

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

revathiv80720177
Known Participant
May 16, 2017

Hi Loic,

Thank You,

Kasyan Servetsky
Legend
May 16, 2017

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