Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export summary tables to excel

Status
Not open for further replies.

NHSSAS

Programmer
Mar 19, 2010
4
GB
Hi,

I've created several summary tables in SAS Enterprise Guide 4.2 and want to export all of the tables to Excel 2003. Is there a way to do this? I can export to HTML and open it with Excel, but I was hoping to simply run the process flow and automatically export into Excel. The only export file types I can export to are HTML, XML and PDF. Is this possible?
 
Try XML, that might work, Excel can read XML.
What is SAS actually running on? Are you remote submitting code to a Unix system via EG? You should just be able to right click on the data, select "Send To" and then "Microsoft Excel". If you can't do that, then it's likely your SAS Server doesn't have that module installed (likely it's a Unix server).
In that case, I recommend using a tagset and proc print.
Code:
ods tagsets.excelxp file="P:\blah.xls"
    options(absolute_column_width='10,10,10,10,8,8,8,8,8,8,8,8,8,8'
            row_repeat='header'
            embedded_titles='yes'
            frozen_headers='yes'
            scale='100' 
            orientation='landscape'
            sheet_name='Report'
           )
   style=styles.psexcel;

proc print data=dset noobs;
run;


ods tagsets.excelxp close;
This should work regardless of what your server platform is, so long as you're running SAS 9.1 or above.
Lower than that, you'll have to just output to a CSV file or something.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top