Hello
I want to print 3 tables side by side in one excel sheet.
When I run my code 3 different excel sheets are created but I want to have only one sheet.
ods path work.temptemp(update) sasuser.templat(update)
sashelp.tmplmst(read);
ods path show;
ods tagsets.excelxp file="/usr/local/SAS/MidulOld/UserDir/Example.xls"
style=htmlblue;
ods tagsets.excelxp options(embedded_titles='yes'
sheet_interval='none' sheet_name='tables'
absolute_column_width="12,13");
Title;
proc print data=a1 noobs label;
Run;
Data a1;
input x y;
cards;
1 10
2 20
3 30
;
Run;
ods tagsets.excelxp options(embedded_titles='yes'
sheet_interval='none' sheet_name='tables'
absolute_column_width="12,13");
Title;
proc print data=a1 noobs label;
Run;
Data a2;
input x y;
cards;
4 10
5 20
6 30
;
Run;
ods tagsets.excelxp options(embedded_titles='yes'
sheet_interval='none' sheet_name='tables'
absolute_column_width="12,13");
Title;
proc print data=a1 noobs label;
Run;
Data a3;
input x y;
cards;
7 10
8 20
9 30
;
Run;
Hello
I want to export 3 tables to one excel file with one sheet only where tables are side by side .
When I run my code 3 different excel sheets are created but I want to have only one sheet.
ods path work.temptemp(update) sasuser.templat(update)
sashelp.tmplmst(read);
ods path show;
ods tagsets.excelxp file="/usr/local/SAS/MidulOld/UserDir/Example.xls"
style=htmlblue;
ods tagsets.excelxp options(embedded_titles='yes'
sheet_interval='none' sheet_name='tables'
absolute_column_width="12,13");
Title;
proc print data=a1 noobs label;
Run;
Data a1;
input x y;
cards;
1 10
2 20
3 30
;
Run;
ods tagsets.excelxp options(embedded_titles='yes'
sheet_interval='none' sheet_name='tables'
absolute_column_width="12,13");
Title;
proc print data=a1 noobs label;
Run;
Data a2;
input x y;
cards;
4 10
5 20
6 30
;
Run;
ods tagsets.excelxp options(embedded_titles='yes'
sheet_interval='none' sheet_name='tables'
absolute_column_width="12,13");
Title;
proc print data=a1 noobs label;
Run;
Data a3;
input x y;
cards;
7 10
8 20
9 30
;
Run;
Check tagsets.msoffice2k_x
ODS TAGSETS does not support tables side by side.
You can use ODS MSOFFICE_2K as suggested by @Ksharp or you can use a PROC EXPORT to a specific range that you can pre-calculate.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.