DATA Step, Macro, Functions and more

Techniques for Export Dataset from SAS to Excel (in PC SAS)

Reply
Contributor
Posts: 52

Techniques for Export Dataset from SAS to Excel (in PC SAS)

Hi Everyone,

 

Please let me know the techniques for this exporting data from PC SAS into Excel. Thanks

 

Regards

Respected Advisor
Posts: 4,646

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

Click on your dataset in explorer window, select menu File - Export... Follow instructions.

PG
Contributor
Posts: 52

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

I tried this option, but it failed.
Respected Advisor
Posts: 4,646

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

Any error message?

PG
Respected Advisor
Posts: 4,646

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

Fail proof (almost): Export as TAB separated text file and import data in Excel.

PG
Super User
Posts: 17,819

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

What version of SAS do you have?

libname out xlsx 'C:\test.xlsx';

data out.want;
set sashelp.class;
run;

libname out;

proc export data=sashelp.class outfile='C:\test2.xlsx' dbms=xlsx replace; run;
Contributor
Posts: 52

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

SAS 9.3

Super User
Super User
Posts: 7,401

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

As mentioned above there are many ways of getting data to Excel:

-> Export from explorer window in SAS

-> Proc export

-> ods tagsets.excelp

-> libname excel

-> output to CSV

-> DDE

-> Copy and paste

 

Your question is too vague.  What have you tried, what errors do you get.  Post your code.

Super User
Posts: 17,819

Re: Techniques for Export Dataset from SAS to Excel (in PC SAS)

Did any of the options I posted work for you, if not please explain why.

 

Here's a blog post detailing several methods:

http://blogs.sas.com/content/sasdummy/2012/02/11/export-excel-methods/

 

 

Ask a Question
Discussion stats
  • 8 replies
  • 276 views
  • 0 likes
  • 4 in conversation