6 Replies Latest reply on May 17, 2017 2:14 AM by revathiv80720177

    InDesign Document to Xls

    revathiv80720177 Level 1

      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

        • 1. Re: InDesign Document to Xls
          Loic.Aigon Adobe Community Professional

          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

          • 2. Re: InDesign Document to Xls
            revathiv80720177 Level 1

            Hi Loic,

             

            Thank You,

            • 3. Re: InDesign Document to Xls
              Kasyan Servetsky Level 5

              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

              • 4. Re: InDesign Document to Xls
                revathiv80720177 Level 1

                Hi Kas,

                 

                I want to export my InDesign Document to excel.I think it is not possible.

                 

                Regards,

                Revathi

                • 5. Re: InDesign Document to Xls
                  Kasyan Servetsky Level 5

                  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:

                  • If you have an xml-structured document, via xml export
                  • collect data by script -- e.g. contents of text frames/find text by specific attributes/etc. -- and save it to csv-file to be imported to Excel later
                  • the same as the previous point, but save it directly to a spreadsheet
                  • Also, for tables, you can simply copy-paste a selection via clipboard

                  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

                  • 6. Re: InDesign Document to Xls
                    revathiv80720177 Level 1

                    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