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
Diamond | Level 26
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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1386 views
  • 0 likes
  • 2 in conversation