<?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 Help on Import data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-on-Import-data/m-p/197982#M266571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found many links in sas support communities under this topic, but i was not able to fix the issue.&lt;/P&gt;&lt;P&gt;My data consist of 134 sheets in single excel workbook with xlsx format. Each file is consisting of 3000 records.&lt;/P&gt;&lt;P&gt;My Question is:&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; How to import all sheet as data set and then append them all at once?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Ganesh&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2015 08:56:42 GMT</pubDate>
    <dc:creator>Ganeshk</dc:creator>
    <dc:date>2015-07-08T08:56:42Z</dc:date>
    <item>
      <title>Help on Import data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-on-Import-data/m-p/197982#M266571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found many links in sas support communities under this topic, but i was not able to fix the issue.&lt;/P&gt;&lt;P&gt;My data consist of 134 sheets in single excel workbook with xlsx format. Each file is consisting of 3000 records.&lt;/P&gt;&lt;P&gt;My Question is:&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; How to import all sheet as data set and then append them all at once?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Ganesh&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-on-Import-data/m-p/197982#M266571</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2015-07-08T08:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Import data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-on-Import-data/m-p/197983#M266572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3&gt;Code: Program&lt;/H3&gt;&lt;PRE class="sce-render" style="font-family: 'Courier New', Menlo, 'Lucida Console'; font-size: 16px;"&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;libname&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;x&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;xlsx&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'/folders/myfolders/x.xlsx'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;x&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;set&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sashelp.vmember&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;keep&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;libname&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;memname&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;where&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;libname&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'X'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;end&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;last&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;_n_&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;eq&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="numeric" style="color: #008080; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;then&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;call&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;execute&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'proc sql;create table want as '&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;call&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;execute&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;cats&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'select * from x.'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;nliteral&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;memname&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;not&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;last&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;then&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;call&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;execute&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'union'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;else&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;call&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;execute&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;';quit;'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;Log: Program&lt;/H3&gt;&lt;P&gt;Notes (9)&lt;/P&gt;&lt;DIV class="sasSource" style="color: #000000;"&gt; 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;P&gt;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 53&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 54 libname x xlsx '/folders/myfolders/x.xlsx';&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote1_1436359369084" style="color: #0000ff;"&gt; NOTE: Libref X was successfully assigned as follows: &lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; Engine: XLSX &lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; Physical Name: /folders/myfolders/x.xlsx&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 55 data x;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 56 set sashelp.vmember(keep=libname memname where=(libname='X')) end=last;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 57 if _n_ eq 1 then call execute('proc sql;create table want as ');&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 58 call execute(cats('select * from x.',nliteral(memname) ));&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 59 if not last then call execute('union');&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 60 else call execute(';quit;');&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 61 run;&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote2_1436359369084" style="color: #0000ff;"&gt; NOTE: There were 2 observations read from the data set SASHELP.VMEMBER.&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; WHERE libname='X';&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote3_1436359369084" style="color: #0000ff;"&gt; NOTE: The data set WORK.X has 2 observations and 2 variables.&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote4_1436359369084" style="color: #0000ff;"&gt; NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; real time 0.03 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; cpu time 0.03 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="sasNote" id="sasLogNote5_1436359369084" style="color: #0000ff;"&gt; NOTE: CALL EXECUTE generated line.&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 1 + proc sql;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 1 + create table want as&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 2 + select * from x.SHEET1&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 3 + union&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 4 + select * from x."TABLE 1 - DATA SET WORK.HAVE"N&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 5 + ;&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote6_1436359369084" style="color: #0000ff;"&gt; NOTE: The import data set has 6 observations and 4 variables.&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote7_1436359369084" style="color: #0000ff;"&gt; NOTE: The import data set has 6 observations and 4 variables.&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote8_1436359369084" style="color: #0000ff;"&gt; NOTE: Table WORK.WANT created, with 6 rows and 4 columns.&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 5 + quit;&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote9_1436359369084" style="color: #0000ff;"&gt; NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; real time 0.20 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; cpu time 0.09 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 62&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 63 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 73&amp;nbsp; &lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 12:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-on-Import-data/m-p/197983#M266572</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-07-08T12:46:37Z</dc:date>
    </item>
  </channel>
</rss>

