Hi SAS Community,
I have used the SAS dataset named “vtemp” and generated the SAS dataset "a.Table_I_want_finally" using proc summary (Please see below code).
proc summary data=vtemp nway missing;
format date date9.;
class date;
var Current One_to_30 Thirty_to_60 Sixty_to_90 Ninety_plus NPNA write_off;
output out=a.Table_I_want_finally(drop=_:)
sum=;
run;
proc print data= a.Table_I_want_finally;
run;
Now I want to export a.Table_I_want_finally to Excel (ver. 1993), and I used the following code.
PROC EXPORT DATA=a.Table_I_want_finally
OUTFILE="\\xxxxx-a9-sas01\kkm\data\ANYNAME.xls"
DBMS=EXCEL REPLACE;
PUTNAMES=YES;
run;
An error messege comes like this:
ERROR: DBMS type EXCEL not valid for export.
Then commented out dbms statement and ran.
Then this error message comes.
ERROR 180-322: Statement is not valid or it is used out of proper order.
Could any one help me to get over this problem?
From the literature, I found these:
DBMS= tells SAS what kind of file to create; the default is Excel 5. But what is the meaning of it?
PUTNAMES to output the variable name. If "PUTNAMES=NO" is used, the export procedure will not output any variable names, beginning with the data record instead.
But why then error message comes?
Thank you for the help
Mirisage
Does your site license SAS/Access for PC File Formats? If not, then you can't use the Excel engine.
Or if your excel file is in English, try to use XLS engine .
DBMS=XLS
Hi Ksharp.
Great!.
It worked like anything!
Many thanks for your help.
Hi Art,
Thank you also for your input.
Warm regards
Mirisage
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.