BookmarkSubscribeRSS Feed
Dick_Shryock
Calcite | Level 5

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:

7 REPLIES 7
art297
Opal | Level 21

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).

LinusH
Tourmaline | Level 20

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
LinusH
Tourmaline | Level 20

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
Dick_Shryock
Calcite | Level 5

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

art297
Opal | Level 21

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.

Dick_Shryock
Calcite | Level 5

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??

art297
Opal | Level 21

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

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

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
  • 7 replies
  • 2154 views
  • 6 likes
  • 3 in conversation