BookmarkSubscribeRSS Feed
Ujjawal
Quartz | Level 8

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;

 

2 REPLIES 2
Reeza
Super User

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.

 

 

SASKiwi
PROC Star

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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 914 views
  • 2 likes
  • 3 in conversation