BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Can tagsets.excelxp output plot?

 

 

ods listing close;
ods tagsets.excelxp file='c:\temp\aaa123.xls' ;



proc sgplot data=sashelp.class;
scatter x=height y=weight / group=sex;
run;


ods tagsets.excelxp close;
ods listing;
run;

5 REPLIES 5
GeorgeSAS
Lapis Lazuli | Level 10

Hello,

 

How to output excel table with graph with ods tagsets.excelxp? I can't get the graph.I use SAS 9.3

 

Thanks

 

ods listing close;
ods tagsets.excelxp file='c:\temp\abc66.xls' ;
ods tagsets.excelxp options(sheet_interval="none");
ods tagsets.excelxp options( embedded_titles='yes' embedded_footnotes='yes' );


title 'Where is my graph?';
style=statistical;
proc sql;
select * from sashelp.class
quit;

proc sgplot data=sashelp.class;
title 'sashelp--class';
scatter x=height y=weight / group=sex;
run;


ods tagsets.excelxp close;
ods listing;
run;

Cynthia_sas
SAS Super FREQ
Hi
By Microsoft design, Spreadsheet ML 2003 does NOT support graphic images. This form of output is what tagsets.excelxp produces. SAS and ODS cannot do what Microsoft did not put in the specification.

ODS excel produces xlsx files which are 2007 office open xml -- which does support graphic images.

Your choices are these:
1) make an html file with graphs that excel can open using ODS msoffice2k
Or
2) use ODS excel

Tagsets.excelxp will NOT have graphs....

By MICROSOFT's design.

Cynthia

Reeza
Super User

No, it cannot. You can use ODS HTML if you want graphs but that doesn't easily support multiple sheets.

 

PS You posted the same question twice, but they appear identical so I'm merging them into a single thread. 

 

Here's a demo from SAS page on many of the features:

https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html

 

Almost every feature of ODS TAGSETS is listed here as well as a link to the paper with the page reference to find example code. The papers at the end of this page would be the key references on learning how to use ODS TAGSETS efficiently.

https://vasug.files.wordpress.com/2011/07/excelxppaperindex.pdf

 

 

Official list of options available:

http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html

 

GeorgeSAS
Lapis Lazuli | Level 10

Hello Reeza,

 

ExcelXP Tagset is good at doing arrange sheets like its name. I can use ExcelXP Tagset print outputs in one single page which other ods can't do.

But ExcelXP Tagset can't generate graph like ods msoffice2k.

               ods _all_ close;

ods msoffice2k path='c:\temp' (url=none)
gpath='c:\temp' (url=none)
file='open_with_Excel8.xls'
style=seaside;

title 'A scatter plot';
proc print data=sashelp.class;
run;

title 'ODS GRAPHICS';
proc sgplot data=sashelp.class;
title 'sashelp--class';
scatter x=height y=weight / group=sex;
run;
ods msoffice2k close;

 

 

 

 

 

also ExcelXP Tagset can't print output start at a user defined cell(have to use ods excel,there is a new option --"start_at",but you must have SAS 9.4).

 

Thanks!

 

 

Reeza
Super User

Thanks, I am aware of the limitations but it's good to know that SAS has addressed most of these in the latest versions. The first version of 9.3 was initially released in 2011 - in other words it's equivalent to using Office 2010. Its good, but the newer versions are better.

 

9.4 has been available since 2013 so a while now, especially in terms of software.

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
  • 5 replies
  • 1806 views
  • 1 like
  • 3 in conversation