<?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: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133886#M27218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can load 365 variables using dbms=xls for an excel 2007 .xls file and dbms=xlsx for excel 2010 file &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Nov 2013 21:32:50 GMT</pubDate>
    <dc:creator>MumSquared</dc:creator>
    <dc:date>2013-11-07T21:32:50Z</dc:date>
    <item>
      <title>how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133884#M27216</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 asked this question once before but didnt formulate it that clearly. Just arrived back from holidays and would like to give it a second shot:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following code from Oleg to import excel 2007/2010 tables with the same structure from a file into sas.&lt;/P&gt;&lt;P&gt;%let dirname = R:\test;&lt;/P&gt;&lt;P&gt;filename DIRLIST pipe "dir /B &amp;amp;dirname\*.xlsx";&lt;/P&gt;&lt;P&gt;data libl.dirlist ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;length fname $256;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;infile dirlist length=reclen ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;input fname $varying256. reclen ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro sks2sas01(input=d:\work\test1,out=libl.testt); /* read files in directory */&lt;/P&gt;&lt;P&gt; %let dir=%str(%'dir %")&amp;amp;input.%str(\%" /A-D/B/ON%');&lt;/P&gt;&lt;P&gt;filename myfiles pipe %unquote(&amp;amp;dir);&lt;/P&gt;&lt;P&gt;data list1;&lt;/P&gt;&lt;P&gt;length fname $256.;&lt;/P&gt;&lt;P&gt;infile myfiles truncover;&lt;/P&gt;&lt;P&gt;input myfiles $100.; /* put infile;*/&lt;/P&gt;&lt;P&gt;fname=quote(upcase(cats("&amp;amp;input",'\',myfiles)));&lt;/P&gt;&lt;P&gt;out="&amp;amp;out";&lt;/P&gt;&lt;P&gt;drop myfiles;&lt;/P&gt;&lt;P&gt;call execute('&amp;nbsp; &lt;/P&gt;&lt;P&gt;PROC IMPORT DBMS=EXCEL2002 OUT= _1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; DATAFILE= '||fname||' REPLACE ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;SHEET="Tabelle1$";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;GETNAMES=YES;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;SCANTEXT=YES;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;USEDATE=YES;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;SCANTIME=YES;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;DBSASLABEL=NONE;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;TEXTSIZE=100;&amp;nbsp; &lt;/P&gt;&lt;P&gt;RUN;&amp;nbsp; &lt;/P&gt;&lt;P&gt;proc append data=_1 base='||out||' force; run;&amp;nbsp; &lt;/P&gt;&lt;P&gt;proc delete data=_1; run; ');&lt;/P&gt;&lt;P&gt;run;&amp;nbsp; &lt;/P&gt;&lt;P&gt;filename myfiles clear;&lt;/P&gt;&lt;P&gt;%mend sks2sas01;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works great. the only problem is that, sas only imports 255 variables and actually i have many more in my excel tables. I looked up this problem in internet and I found the following link from SAS:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/37/612.html"&gt;http://support.sas.com/kb/37/612.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to this, i would probably need to save the excel files to text files first and then do the import. Is there any way that i can modify the code before and let SAS read all the variables into a dataset? or maybe with a loop, so that 255 variables at a time and then merge the datasets into one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very grateful for any tipps and help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&amp;nbsp; Dingdang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 14:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133884#M27216</guid>
      <dc:creator>Dingdang</dc:creator>
      <dc:date>2013-11-07T14:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133885#M27217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried DBMS = Excel2007 or DBMS = XLSX?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 19:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133885#M27217</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2013-11-07T19:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133886#M27218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can load 365 variables using dbms=xls for an excel 2007 .xls file and dbms=xlsx for excel 2010 file &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 21:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133886#M27218</guid>
      <dc:creator>MumSquared</dc:creator>
      <dc:date>2013-11-07T21:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133887#M27219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI SASKiwi and MumSquared,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you both for your answers. I am using SAS 9.2 and I tried with both statements, but I got the error message saying that DBMS=XLSX not valid for proc import, which I dont quite understand. I read some old posts and this should be able to work in SAS 9.2. which version are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&amp;nbsp; Dingdang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 07:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133887#M27219</guid>
      <dc:creator>Dingdang</dc:creator>
      <dc:date>2013-11-08T07:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133888#M27220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that the DBMS=XLSX was implemented in 9.3. Time for an upgrade...?&lt;/P&gt;&lt;P&gt;Have you tried the LIBNAME EXCEL engine?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 17:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133888#M27220</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-11-08T17:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133889#M27221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm on 9.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Nov 2013 23:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133889#M27221</guid>
      <dc:creator>MumSquared</dc:creator>
      <dc:date>2013-11-11T23:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: how can I make SAS import more than 255 Variables from EXCEL 2007 at a time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133890#M27222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok...? My respone was to &lt;A __default_attr="821120" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 11:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-I-make-SAS-import-more-than-255-Variables-from-EXCEL/m-p/133890#M27222</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-11-12T11:39:26Z</dc:date>
    </item>
  </channel>
</rss>

