DATA Step, Macro, Functions and more

ODS Tagset excel - Titles for Columns

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

ODS Tagset excel - Titles for Columns

Guys,

I am trying to create an excel report, by using ods tagsets.excelxp.

 

Title1:I got thisTitle2: Ineed thisTitle2: I need this
   
MonthPrevious MonthFuture Month
   
MarFebApr
AprMarMay

 

ods tagsets.excelxp file="...\abc.xml" options(embed_titles='yes');
title "I got this";
proc print...;
run;
ods tagsets.excelxp close;

 

What changes, do I need to do for the code, if I want Title2 and Title3, respective to Previous Month and Future Month Columns?

 

Thank YOU


Accepted Solutions
Solution
‎04-28-2017 09:45 PM
Valued Guide
Posts: 632

Re: ODS Tagset excel - Titles for Columns

One easy way to control your text is to use PROC REPORT.

title;
proc report data=sashelp.class;
column ('i got this' name) ('second' age) ('third' sex);
define name /display 'insteadofname';
define age / display 'insteadofage';
define sex / display 'insteadofsex';
run;

This avoids any tagset issues.

View solution in original post


All Replies
Solution
‎04-28-2017 09:45 PM
Valued Guide
Posts: 632

Re: ODS Tagset excel - Titles for Columns

One easy way to control your text is to use PROC REPORT.

title;
proc report data=sashelp.class;
column ('i got this' name) ('second' age) ('third' sex);
define name /display 'insteadofname';
define age / display 'insteadofage';
define sex / display 'insteadofsex';
run;

This avoids any tagset issues.

Occasional Contributor
Posts: 15

Re: ODS Tagset excel - Titles for Columns

hi ArtC

Thanks for your time. But I need titles above the columns. I'm able to generate the first Title. So, for the column2, 'Previous Month',  I need the title as "I need this". Is there a way to do so?

 

Title1:I got thisTitle2: Ineed thisTitle2: I need this
   
MonthPrevious MonthFuture Month
   
MarFebApr
AprMarMay
Valued Guide
Posts: 632

Re: ODS Tagset excel - Titles for Columns

Did you execute the REPORT step? In what way does the PROC REPORT not place the text as you requested? Must the text come from a TITLE statement?
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 128 views
  • 1 like
  • 2 in conversation