I am trying to send my results to multi-sheet excel files. My results includes table, title and GRAPH. My code is working fine. But it is creating two workbooks. One for tables and other for GRAPH. I am unable to insert GRAPH into the same file. I have tried TAGSETS.MSOFFICE2K_X but it is not working.
WARNING: Tagset TAGSETS.MSOFFICE2K_X not found; the default tagset will be used instead.
ods tagsets.excelxp file='C:\Users\Ujjawal\Documents\multitable.xls' style=STATISTICAL
options(sheet_name='Summary' skip_space='1,0,0,0,1' EMBEDDED_TITLES='yes' sheet_interval='none' suppress_bylines='no');
Title " First File";
proc freq data = sashelp.class;
table sex;
run;
data temp2;
set sashelp.cars;
Title " Second File";
proc print;
run;
ods tagsets.excelxp
options(sheet_name='FREQ' skip_space='1,0,0,0,1' EMBEDDED_TITLES='yes' sheet_interval='none' suppress_bylines='no');
Title " Third File";
proc freq data = sashelp.cars;
table make;
run;
ods tagsets.excelxp close;
ods msoffice2k path='C:\Users\Ujjawal\Documents' (url=none)
gpath='C:\Users\Ujjawal\Documents' (url=none)
file="file1.xls";
proc sgplot data= sashelp.cars;
vbar make;
run;
ods msoffice2k close;
What version of SAS do you have?
Have you downloaded the latest tagsets version from the ODS website?
https://support.sas.com/rnd/base/ods/odsmarkup/index.html
If you have 9.4+ you can look into ODS Excel which can incorporate both graphs and tables.
Unfortunately there isn't a good destination before to incorporate both easily. You can do it, just not as straightforward as you like. Look for papers or examples on here from Cynthia Zender on how to accomplish this.
You can't mix different tagsets in the same Excel workbook. It has to be either all EXCELXP or all MSOFFICE2K.
What happens if you try to put the graph in EXCELXP?
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.