1 Reply Latest reply on Dec 21, 2015 2:36 AM by sarfrazm7834471

    how to import cals table into InDesign by InDesign Script

    sarfrazm7834471 Level 1

      I have cals table in my indesign document, but problem is that table data showing into data format, not showing in table format...

      My requirement is to show this data into table format...

      Anyone can help me Please...

      Thanks...

        • 1. Re: how to import cals table into InDesign by InDesign Script
          sarfrazm7834471 Level 1

          <?xml version="1.0" encoding="UTF-8"?>
          <table>
               <label>TABLE 4-3</label>
               <caption id="cap0110">
                   <simple-para id="sp0115">Estimated ME Requirements for Adult Psittacines in Various Environments and Activity Levels</simple-para>
               </caption>
               <table frame="none"><tgroup cols="2">
                   <colspec colname="col1" colnum="1" colwidth="50%"/>
                   <colspec colname="col2" colnum="2" colwidth="50%"/>
                   <thead>
                       <row>
                           <entry>Management Scenario</entry>
                           <entry>ME Requirement (kcal/day)</entry>
                       </row>
                   </thead>
                   <tbody>
                       <row>
                           <entry>Indoor cage</entry>
                           <entry>154.6 × (BW in kilograms)<sup>0.73</sup></entry>
                       </row>
                       <row>
                           <entry>Indoor aviary</entry>
                           <entry>176.6 × (BW in kilograms)<sup>0.73</sup></entry>
                       </row>
                       <row>
                           <entry>Outdoor aviary in warm/hot environment</entry>
                           <entry>203.9 × (BW in kilograms)<sup>0.73</sup></entry>
                       </row>
                       <row>
                           <entry>Outdoor aviary in cold environment</entry>
                           <entry>226.1 × (BW in kilograms)<sup>0.73</sup></entry>
                       </row>
                       <row>
                           <entry>Free ranging</entry>
                           <entry>229.2 × (BW in kilograms)<sup>0.73</sup></entry>
                       </row>
                   </tbody>
               </tgroup>
          </table></table>

          ====================================


          My XML File contains above Data, This is the code to import XML file into InDesign Document.....

          This is working Properly...


          #target indesign

          var doc = app.activeDocument;

          var myFile = File.openDialog("Select XML file");

          doc.importXML(myFile);