Hi,
I'm trying to export data to an excel file without labeling it since I want the first row in the excel file to be the first row with data in the EG database.
I have EG 4.3 SAS9.2
proc export
data=work.QUERY_ART
DBMS=excelcs
outfile="C:\Documents\Reports SAS\Test.xls"
Replace;
PUTNAMES=NO;
Sheet="Test";
Server="pgl0408";
Port=8629;
Run;
However it gets an "ERROR 180-322: Statement is not valid or it is used out of proper order." for the putnames statement.
Appreciate all the help.
Hi,
I think PUTNAMES=NO will not work with excel file. Try to export it as csv file.
Thanks
Why do you need no names?
When EG imports it strips the first row usually anyways.
Did you try ODS ?
ods tagsets.excelxp file='c:\temp\x.xls' ; proc report data=sashelp.class noheader nowd; run; ods tagset.excelxp close;
Xia Keshan
Hi,
I have tried with ODS as you mentioned:
ods tagsets.ExcelXP file='C:\Documents\Reports SAS\test1.XLS';
Proc Report data=work.query_art_vta_compl noheader nowd;
run;
ods tagsets.ExcelXP close;
and it turns out the following error:
ERROR: Physical file does not exist, C:\Documents\Reports SAS\test1.XLS.
And it did produces any file.
Are running this on a server or locally. The server may not have a path available of C:\Documents\Reports SAS.
Hi,
Use this for the desired output.
Thanks,
Naeem
proc export
data=work.QUERY_ART
DBMS=csv
outfile="C:\Documents\Reports SAS\Test.csv"
Replace;
PUTNAMES=NO;
Run;
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.