<?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: proc import into different sas tables from excel sheet names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492497#M129422</link>
    <description>&lt;P&gt;Thanks it works&lt;/P&gt;</description>
    <pubDate>Tue, 04 Sep 2018 22:38:00 GMT</pubDate>
    <dc:creator>radha009</dc:creator>
    <dc:date>2018-09-04T22:38:00Z</dc:date>
    <item>
      <title>proc import into different sas tables from excel sheet names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492359#M129373</link>
      <description>&lt;P&gt;i have a spreadsheet with unknown tab names and count with ticket number. i varlist all the tab names. Now using varlist tab names from I want to import data and create for each a table. Please help me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;select memname into :varlist1 separated by ' '&lt;BR /&gt;from sashelp.vtable&lt;BR /&gt;where&lt;BR /&gt;libname="XLS"&lt;BR /&gt;and memname like '%TKT%';&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from the above all tabs containing tkt are in varlist1. Now i want to loop number of tabs and import data into different tables. ex: i have 3 tab names in&amp;nbsp;&lt;SPAN&gt;varlist1 ( TKT _ SSH, TKT_Weblogic , TKT_PATCH). Please let me know how can i create multiple tables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT = work.file&lt;BR /&gt;DATAFILE="&amp;amp;filepath"&lt;BR /&gt;DBMS=XLSX;&lt;BR /&gt;Sheet=&amp;amp;varList1.;&lt;BR /&gt;getnames = yes;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 16:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492359#M129373</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-09-04T16:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc import into different sas tables from excel sheet names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492361#M129375</link>
      <description>&lt;P&gt;If you already have a libname set up why not use PROC COPY instead. It will copy all worksheets into SAS at once.&lt;/P&gt;
&lt;P&gt;You may be able to use the wildcard approach there, not sure if the SELECT statement wildcard will work as shown but it's easy enough to remove.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myfiles xlsx 'path tomy excel file';

proc copy in=myfiles out=work;&lt;BR /&gt;select TCK_:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192083"&gt;@radha009&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i have a spreadsheet with unknown tab names and count with ticket number. i varlist all the tab names. Now using varlist tab names from I want to import data and create for each a table. Please help me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt;select memname into :varlist1 separated by ' '&lt;BR /&gt;from sashelp.vtable&lt;BR /&gt;where&lt;BR /&gt;libname="XLS"&lt;BR /&gt;and memname like '%TKT%';&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from the above all tabs containing tkt are in varlist1. Now i want to loop number of tabs and import data into different tables. ex: i have 3 tab names in&amp;nbsp;&lt;SPAN&gt;varlist1 ( TKT _ SSH, TKT_Weblogic , TKT_PATCH). Please let me know how can i create multiple tables&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT OUT = work.file&lt;BR /&gt;DATAFILE="&amp;amp;filepath"&lt;BR /&gt;DBMS=XLSX;&lt;BR /&gt;Sheet=&amp;amp;varList1.;&lt;BR /&gt;getnames = yes;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 16:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492361#M129375</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-04T16:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc import into different sas tables from excel sheet names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492497#M129422</link>
      <description>&lt;P&gt;Thanks it works&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 22:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-into-different-sas-tables-from-excel-sheet-names/m-p/492497#M129422</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-09-04T22:38:00Z</dc:date>
    </item>
  </channel>
</rss>

