<?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: Use existing Set and loop to read different Excel Tabs with dinamic outputs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322590#M271112</link>
    <description>&lt;P&gt;Thanks, it worked!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2017 05:54:53 GMT</pubDate>
    <dc:creator>User12321</dc:creator>
    <dc:date>2017-01-05T05:54:53Z</dc:date>
    <item>
      <title>Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322557#M271106</link>
      <description>&lt;P&gt;I have a &amp;nbsp;SAS data set A &lt;SPAN&gt;(just one column NAMES with 100 records)&amp;nbsp;&lt;/SPAN&gt;with list of all existing Excel tabs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose there is an existing macro %readtab(sheet) to read one tab/sheet from Excel.&lt;/P&gt;&lt;P&gt;I need help to create a loop that would read from set A each &amp;nbsp;record (tab name), then using %readtab(sheet) read data from the Excel spreadsheet and put it into output file named as respective TAB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I.e. after executing a loop, i should have 100 &amp;nbsp;SAS sets with names like original Excel tabs.&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 01:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322557#M271106</guid>
      <dc:creator>User12321</dc:creator>
      <dc:date>2017-01-05T01:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322562#M271107</link>
      <description>&lt;P&gt;The easiest way to do this would be to number your tables like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have1 - have100;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jan 2017 02:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322562#M271107</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-01-05T02:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322564#M271108</link>
      <description>&lt;BLOCKQUOTE&gt;&amp;nbsp;%readtab(sheet) read data from the Excel spreadsheet and put it into output file named as respective TAB.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This should occur in the readtab macro - it should control/specify your output name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No "loop" needed - look at Call Execute() it will call the macro for each value in your dataset. If you using a naming convention then you can append all the datasets at the end as indicated by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is an example in the documentation.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#n1q1527d51eivsn1ob5hnz0yd1hx.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#n1q1527d51eivsn1ob5hnz0yd1hx.htm&lt;/A&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;</description>
      <pubDate>Thu, 05 Jan 2017 02:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322564#M271108</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-05T02:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322577#M271109</link>
      <description>&lt;P&gt;I am not sure I follow.&lt;/P&gt;&lt;P&gt;I need Actuale names, and I do not know them in advance (i.e. set A is different every time I will run the program with new data)&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 03:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322577#M271109</guid>
      <dc:creator>User12321</dc:creator>
      <dc:date>2017-01-05T03:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322580#M271110</link>
      <description>&lt;P&gt;Thanks, I guess I should look at Example 2. It is quite close. I just need to figure out output sets. I probably need to put it inside of %readtab macro. Will this work with SAS 9.2?&lt;/P&gt;&lt;P&gt;I probably can get 9.4, but it takes long time to get something from IT at my place...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 03:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322580#M271110</guid>
      <dc:creator>User12321</dc:creator>
      <dc:date>2017-01-05T03:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322582#M271111</link>
      <description>&lt;P&gt;Looks like it may work with 9.2.&lt;/P&gt;&lt;P&gt;Thanks, I will try it tomorrow and will post update&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 03:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322582#M271111</guid>
      <dc:creator>User12321</dc:creator>
      <dc:date>2017-01-05T03:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use existing Set and loop to read different Excel Tabs with dinamic outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322590#M271112</link>
      <description>&lt;P&gt;Thanks, it worked!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 05:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-existing-Set-and-loop-to-read-different-Excel-Tabs-with/m-p/322590#M271112</guid>
      <dc:creator>User12321</dc:creator>
      <dc:date>2017-01-05T05:54:53Z</dc:date>
    </item>
  </channel>
</rss>

