BookmarkSubscribeRSS Feed
Lopes
Calcite | Level 5

Good afternoon,

I need to export from SAS to Excel.

I tried with the proc export but it changed the format and it did not show the column names.

proc export

  data=WORK.xxx

  dbms=xls

  outfile="xxx.xls"

  replace;

run;

How can I export?

Thanks!

3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12

since you are in the EGuide GUI, you can just export using file --> export.

overmar
Obsidian | Level 7

Insert "label" into the code before replace, this will export the labelled column names from SAS into excel. Mind you if you put labels onto the columns in SAS ie rather than UID you have the label "Unique ID variable", "Unique ID variable" is what will appear in Excel.

proc export

  data=WORK.xxx

  dbms=xls

  outfile="xxx.xls"

  label

  replace;

run;

If you have variable labels and wanted the SAS variable name to actually be output you could put this before your proc export statement

proc datasets lib=work memtype=data;

  modify xxx;

  attrib _all_ label=' ';

run;

Hope this helps.

NK
Calcite | Level 5 NK
Calcite | Level 5

export it as in cvs format and then to excel

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 1011 views
  • 0 likes
  • 4 in conversation