<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scripting : Multiple tables from Excel in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scripting-Multiple-tables-from-Excel/m-p/561816#M77491</link>
    <description>&lt;P&gt;dt seems to be a list, so reference items by using indices&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt[1]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if you have JMP16 For Each might also be helpful&lt;/P&gt;</description>
    <pubDate>Fri, 28 Oct 2022 14:45:42 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-10-28T14:45:42Z</dc:date>
    <item>
      <title>Scripting : Multiple tables from Excel</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Multiple-tables-from-Excel/m-p/561813#M77490</link>
      <description>&lt;P&gt;Writing a script to open&amp;nbsp; Excel files that contain multiple sheets then do independent analysis with each individual sheet. The names and number of sheets from different Excel files can be different, so would like to write a generic code that can work on different files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Used Open command to open the file&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open ("file path");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This particular example file has three sheets, so &lt;U&gt;show (dt);&lt;/U&gt; gives this result in log:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = {DataTable("Sheet 1"), DataTable("Sheet 2"), DataTable("Sheet 3")}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Need to assign each datatable in dt to different variables, what is the correct syntax to do that?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = dt (1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;It did not work. dt1 essentially equals dt. show (dt1); gives this result in log:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = {DataTable("Sheet 1"), DataTable("Sheet 2"), DataTable("Sheet 3")};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:01:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Multiple-tables-from-Excel/m-p/561813#M77490</guid>
      <dc:creator>GroupSquareWolf</dc:creator>
      <dc:date>2023-06-09T16:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting : Multiple tables from Excel</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Multiple-tables-from-Excel/m-p/561816#M77491</link>
      <description>&lt;P&gt;dt seems to be a list, so reference items by using indices&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt[1]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if you have JMP16 For Each might also be helpful&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 14:45:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Multiple-tables-from-Excel/m-p/561816#M77491</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-10-28T14:45:42Z</dc:date>
    </item>
  </channel>
</rss>

