Desktop productivity for business analysts and programmers

DBMS =

Reply
Contributor
Posts: 25

DBMS =

Hello All,

I am using Enterprise Guide 4.3 and SAS 6.2.  I am trying to export a dataset to Excel and keep getting an error Message:

Here is my code:

/* Write data out to Excel file */

PROC EXPORT DATA = work.resident

OUTFILE = "\\sasmeta\projects\EG Projects\dick\A-4.3 Projects\Resident\SeenByResident&rptdate..xlsx"

DBMS = EXCEL2007 REPLACE;

RUN;

ERROR: DBMS type EXCEL2007 not valid for export.

Doesn't seem to matter what itteration of Excel I Use or whether I Name the file.xls or .xlsx.

Can someone help me with this,

Thanks,

Dick Shryock

My log produces this error message:

PROC Star
Posts: 7,430

DBMS =

Are you sure you are only on SAS 6.2?

I was going to ask if the had SAS/Access for PC File formats licensed, but I don't think it was/is available for such an old version.

In the event you are wrong about the version of SAS that you have, have you tried to see if it will work by specifying the XLS engine?  And, since you mention that you've tried with xls and xlsx extensions, there is always the question of whether you are using a 32 or 64 bit version of SAS (i.e., where you might need to use the EXCELCS engine).

Super User
Posts: 5,380

DBMS =

I'm pretty sure that the version number is a typo, since there never was a 6.2 version (maybe a 6.02...?), and EG 4.3 cannot connect to any older SAS versions, especially not 6.X-versions.

So, do you have a local SAS server or a remote? If remote, is UNIX or Windows?

And, as Art mentions, license for PC File Formats.

And a potential need for configuring a PC Files Server.

/Linus

Data never sleeps
Super User
Posts: 5,380

DBMS =

What about using the EG task for exporting to Excel?

Have you tried it, or doesn't it fit your needs for some reason?

/Linus

Data never sleeps
Contributor
Posts: 25

DBMS =

You guys were right about the typo it is 9.2.  I tried the EG Task however maybe I'm not using it right but I need to automate this project and name the file with a &variable imbeded in the name.  I don't think that I can do that using the task.  Hope that I'm wrong.

-d

PROC Star
Posts: 7,430

DBMS =

You are both right and wrong.  No, you can't directly use a variable name to name files you are trying to import, but you can assign a variable's name or data to a macro variable and then use that macro variable for accomplishing the originally desired task.  Similarly, when one is reading multiple files, the names of those files can be icorporated amongst the data.

Contributor
Posts: 25

DBMS =

Art,

I'm trying to export to a file with a &variable imbedded in the file name, can I do that using the exel task or must I do it manually??

PROC Star
Posts: 7,430

DBMS =

You can do it but the filename must be enclosed with double rather than single quotes in order for the macro variable to resolve.

Ask a Question
Discussion stats
  • 7 replies
  • 678 views
  • 6 likes
  • 3 in conversation