<?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 Importing excel with over 11,000 columns causes varname to change in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225683#M53963</link>
    <description>&lt;P&gt;I have a large xlsx file with no headings just data.&amp;nbsp; I'm expecting sas to import the file and name each variable after what column it is in.&lt;/P&gt;&lt;P&gt;For example the first variable is name "A" and so on till "ZZ".&amp;nbsp; After "ZZ" I get var703 and it continues incrementing from there till it gets to var11664.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I keep it using the column letters or make all the variables have var and the column number?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the sas code I'm using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import 
		datafile="c:\temp\temp.xlsx"
		out=temp
		dbms=xlsx
		replace ;
getnames=no ;		
guessingrows=2147483647 ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2015 18:53:41 GMT</pubDate>
    <dc:creator>jerry898969</dc:creator>
    <dc:date>2015-09-15T18:53:41Z</dc:date>
    <item>
      <title>Importing excel with over 11,000 columns causes varname to change</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225683#M53963</link>
      <description>&lt;P&gt;I have a large xlsx file with no headings just data.&amp;nbsp; I'm expecting sas to import the file and name each variable after what column it is in.&lt;/P&gt;&lt;P&gt;For example the first variable is name "A" and so on till "ZZ".&amp;nbsp; After "ZZ" I get var703 and it continues incrementing from there till it gets to var11664.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I keep it using the column letters or make all the variables have var and the column number?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the sas code I'm using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import 
		datafile="c:\temp\temp.xlsx"
		out=temp
		dbms=xlsx
		replace ;
getnames=no ;		
guessingrows=2147483647 ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2015 18:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225683#M53963</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2015-09-15T18:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with over 11,000 columns causes varname to change</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225718#M53965</link>
      <description>None of the proc import options I am aware of let you control column names if they are not in the dataset.&lt;BR /&gt;A separate step using proc datasets would likely be your best bet. Unless you insert a row in the xlsx and assign the column header there before import.</description>
      <pubDate>Tue, 15 Sep 2015 21:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225718#M53965</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-09-15T21:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with over 11,000 columns causes varname to change</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225787#M53975</link>
      <description>&lt;P&gt;May I ask why you would want to? &amp;nbsp;As always, I would suggest that you create a datastep import, use the code generate by proc import, and I would change all character variables, e.g. A, AA, to varX version. &amp;nbsp;That way you can relate to them in arrays and such like. &amp;nbsp;I would also ask what kind of actual processing you are likely to do on 11,000 variables? &amp;nbsp;That seems to be a very large amount, Personally I wouldn't like to work with dataset of more than 100 variables, and that itself is a challenge. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this data, I would write a small VBA macro pseudo code of:&lt;/P&gt;&lt;P&gt;open csv file&lt;/P&gt;&lt;P&gt;loop over all columns&lt;/P&gt;&lt;P&gt;&amp;nbsp; for each row in column write out column_name,column_value&lt;/P&gt;&lt;P&gt;end loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would provide you with a thin csv file with two columns, one with the column name, one with the result. &amp;nbsp;Makes your import program so much easier, you can process the name as you like, and if you really have to work with the transposed data you can transpose up by column_name.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 09:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225787#M53975</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-09-16T09:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Importing excel with over 11,000 columns causes varname to change</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225841#M53981</link>
      <description>&lt;P&gt;Thank you RW9 and Ballardw for your responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a very large data processes that has changed and we were forced to take a different route.&amp;nbsp; We wanted the import to have a systematic naming convention so in our other programs we could loop through the variables.&amp;nbsp; What I'm working on now is just creating my own naming for each column and importing it with getnames=yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that is a very large amount of columns. We used to use a different application but they have changed it and now instead of getting multiple tables they are giving us just one wide one.&amp;nbsp; It will be split up into many smaller tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again both of you for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 14:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-excel-with-over-11-000-columns-causes-varname-to/m-p/225841#M53981</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2015-09-16T14:20:20Z</dc:date>
    </item>
  </channel>
</rss>

