Help using Base SAS procedures

SAS to Excel

Reply
N/A
Posts: 0

SAS to Excel

Hi All,

I have an output data set 'ext4' in work.I want to export this ODS to excel. I tried google serach on how to do this , but did not get much help.

kindly could anyone please sugeest me on this.

kindest regards,
Mark
Occasional Contributor
Posts: 17

Re: SAS to Excel

Posted in reply to deleted_user
Hi Mark,

If you are using pc SAS, you should be able to go to File --> Export Data
and a new window will open up and walk you through the process of creating and naming the Excel file and where to save it.

peat
SAS Super FREQ
Posts: 8,869

Re: SAS to Excel

Posted in reply to deleted_user
Hi:
For some code examples, see these previous forum postings:
http://support.sas.com/forums/thread.jspa?messageID=7958἖
http://support.sas.com/forums/thread.jspa?messageID=31690篊

For an explanation of all the various ODS techniques, see this previous forum posting:
http://support.sas.com/forums/thread.jspa?messageID=8719∏

And the answer to this question back in March, still applies, as well:
http://support.sas.com/forums/thread.jspa?messageID=33372艜

cynthai
Occasional Contributor
Posts: 9

Re: SAS to Excel - Macro for easy reuse

Posted in reply to deleted_user
%macro xlsxport(lib,dataset,ssname,sheet);
*XPORT a spreadsheet to c:\xxxx\ssname.xls because everyone will have this folder.;
PROC EXPORT DATA= &lib..&dataset
OUTFILE= "C:\xxxx\yyyy\zzzz\&ssname..xls"
DBMS=EXCEL2000 REPLACE;
sheet=&sheet;
run;
%MEND xlsxport;

to use this...

%xlsxport(work,mydataset,myexcelworkbook,myexcellsheet);

You can adjust the path name to fit your needs.
Ask a Question
Discussion stats
  • 3 replies
  • 332 views
  • 0 likes
  • 4 in conversation