BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Mirisage
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Or if your excel file is in English, try to use XLS engine .

DBMS=XLS

View solution in original post

3 REPLIES 3
art297
Opal | Level 21

Does your site license SAS/Access for PC File Formats?  If not, then you can't use the Excel engine.

Ksharp
Super User

Or if your excel file is in English, try to use XLS engine .

DBMS=XLS

Mirisage
Obsidian | Level 7

Hi Ksharp.

Great!.

It worked like anything!

Many thanks for your help.

Hi Art,

Thank you also for your input.

Warm regards

Mirisage

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2363 views
  • 0 likes
  • 3 in conversation