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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.