I'm trying to export more than 256 columns as an excel file or a .csv file. Can this be done with SAS 9.2 ??
Hi,
It has nothing to do with SAS. 256 is the limit of Excel before 2007 version. Before 2007, the column limit is 256, and the row limit is 16k; while after 2007, the column limit is 64k and the row limit is 1M.
Regards,
Haikuo
Thanks.. I have Excel 2010. Do I need to load any special Excel Add-ins?
The problem is not with Excel, it is with the library used to access it (JET or ACE). For a somewhat clunky workaround, look at the split255 macro described here :
http://support.sas.com/kb/36/904.html
PG
I'm confused. You said that a csv file would suffice. The following, using 9.2 on Windows, creates a 1002 column file that opens in Excel 2010 without any problem:
data test;
array item(1000);
do i=1 to 100;
do j=1 to 1000;
item(j)=j;
end;
output;
end;
run;
proc export data=work.test
outfile='c:\art\wide.csv'
dbms=csv
replace;
run;
I also downloaded the SAS Addin called: Export to Microsoft Excel 2007/2010 from the SAS website. It's working great but it's like a Wizard. It doesn't produce code you can use in batch. And it will only Export to a Windows environment so if you have a large file, it takes a bit. Have a great day..
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.