Hello
In following code I export multiple tables to multiple sheets.
In sheet1 there will be 2 tables
In sheet2 there will be 2 tables
My question is how to tell SAS to locate the tables in following location:
Sheet1-table1 will be located from cell A1,table2 will be located from cell A15
Sheet2-table1 will be located from cell A1,table2 will be located from cell A15
Title;
ods tagsets.excelxp file="path/test1.xls" style=minimal
options(sheet_interval="none" sheet_name='Sheet1');
proc print data=sashelp.class(obs=5)noobs;
run;
proc print data=sashelp.air(obs=5) noobs;
run;
ods tagsets.excelxp options(sheet_interval="none" sheet_name='Sheet2');
proc print data=sashelp.orsales(obs=5)noobs;
run;
proc print data=sashelp.prdsale(obs=5)noobs;
run;
ods tagsets.excelxp close;
As far as I know you can either
1. Use the panel option in ODS MSOFFICE2K
http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html
2. Use the start_at option
ods excel options(sheet_name="class" sheet_interval="none" start_at="A2");
3. Export to a named range using proc export.
4. This might also interest you
http://www.sascommunity.org/mwiki/images/6/6d/1793-2014.pdf
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.