BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

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;

 

 

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

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

 

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1128 views
  • 0 likes
  • 2 in conversation