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..
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.