04-11-2016 04:46 PM
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;
04-11-2016 04:54 PM
What version of SAS do you have?
Have you downloaded the latest tagsets version from the ODS website?
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.
04-11-2016 05:30 PM - edited 04-11-2016 05:30 PM
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?