I want to take a SAS data set and create an XLS or XLSX file where the first row is not the SAS variable names. In other words, I want row 1 in Excel to be the first row of data in the SAS data set.
I do not want an XML file.
How can I do this?
Here is one way: A Poor/Rich SAS Users Proc Export - sasCommunity
Well that was way too easy! Thanks!
I'll be sure to make it more difficult next time!
Proc Report needs a boost. Here's the PROC REPORT/NOHEADER method.
Cynthia
ods csv file='c:\temp\noheader.csv';
proc report data=sashelp.class nowd noheader;
run;
ods csv close;
proc export data=sashelp.class outfile='c:\temp\class.xls' dbms=xls replace;
putnames=no;
run;
In one short link: SAS/ACCESS(R) 9.2 Interface to PC Files: Reference, Second Edition
Yes. They are different engine. Excel engine can handle both ascii( english character) - single byte stored and DBMS - double byte stored ( like Chinese Korea Japanese) . but XLS only can handle single byte stored character( english ) . since you are from U.S , that doesn't matter if using excel or xls . But for me from China , only can use Excel engine.
Xia Keshan
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.