BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

I am using the option tagsets.ExcelXP to "export" my SAS procedures to Excel. At the moment, even though a title is entered and is displaying in the SAS html file created, no title appear in the Excel I'm creating.

Here is the code I'm using (simplified for your benefit) :

ods listing close;
ods tagsets.ExcelXP file='\[...]\TEST101.XLS';
ods tagsets.excelxp options(sheet_name="Purchase 90%");

PROC TABULATE

[running a standard table procedure here]

TITLE1 'Data for product Purchase 90%';

RUN;


ods tagsets.excelxp options(sheet_name="Purchase 95%");

PROC TABULATE

[running a standard table procedure here]

TITLE1 'Data for product Purchase 95%';

RUN;

ods tagsets.ExcelXP close;

Any idea? Many thanks! Message was edited by: SamuelG.
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
(You might want to post ODS questions to the ODS Forum in the future...)

With the TAGSETS.EXCELXP destination, you are NOT creating HTML files. You are creating Spreadsheet Markup Language XML files that comply with the Microsoft Office 2003 XML specification for workbooks/worksheets.

By default, the SAS title is put into the "print header" of the worksheet. So you should see it in Print Preview mode.

Otherwise, if you invoke the tagset with the suboption doc="Help", you will see that there are some other suboptions you can specify that will put the titles into the body of the worksheet. Try this:
[pre]
ods tagsets.ExcelXP file='c:\temp\title.xls' style=sasweb
options(doc="Help" embedded_titles="Yes");

proc print data=sashelp.class;
title 'this is the title';
run;

ods _all_ close;
[/pre]

The help information will be in the SAS log after this program runs.

cynthia
deleted_user
Not applicable
Many thanks Cynthia!

This trick worked just fine.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 714 views
  • 0 likes
  • 2 in conversation