HI I need hellp exporting multiple dataset outputs into one sheet in excel. I am using proc report to output my data.
You can direct SAS to output multiple reports to a single sheet in Excel via the ODS EXCEL option SHEET_INTERVAL='NONE'
Example:
ods excel file="c:\myfolder\myexcelfile.xlsx" options(sheet_interval='NONE');
proc report data=whatever;
...
run;
proc report data=whatever2;
...
run;
ods excel close;
Please note: the column widths have to be the same as they are in one Excel sheet. For examplle, if the second column of the first table is wider than the second column of the second table, the Excel file makes the column wide enough for everything, even though that is too wide in the second table.
Hi:
ODS EXCEL has a suboption called "sheet_interval" if you want multiple procedure steps (whether multiple PROC REPORTS or a mix of procedures), all you need to do is use the correct suboption. Here's an example:
Cynthia
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.