ODS tagsets.excelxp question

Reply
Contributor
Posts: 74

ODS tagsets.excelxp question

I am using ods to output a spreadsheet for my sas tables.  Is there an option to center the column headings?  I can put a filter on and lock the header row but I would like to center the column heading and make it bold if possible.

here is a sample of what I have so far:

ods listing close;

ods tagsets.excelxp

file=rptfl

options(embedded_titles='yes' minimize_style='yes' wraptext='no' AUTOFIT_HEIGHT='yes' )

rs=none style=Statistical;

ods noproctitle;

/*definitions tab*/

ods tagsets.excelxp options(sheet_name="Definitions" sheet_interval='none' embedded_titles='on' wraptext = "no"

absolute_column_width="9,55,20");


Thanks,

Trusted Advisor
Posts: 1,137

Re: ODS tagsets.excelxp question

Hi,

I am not sure if there is a way to to control the column headers from the ods tagsets.excelxp options. However you could select a particular style and then by proc template you could modify that style and create your own style and apply this style in the ods tagsets.excelxp. something which i have done here.

sansPrinter is one of the ods tagsets.excelxp style available, which i have taken and modified the column headers as below and created a new style called XLsansPrinter which i again used in tagsets.excelxp.

proc template;

define style styles.XLsansPrinter;

parent = styles.sansPrinter;

style header from header /

font_size = 12pt

font_weight = bold

font_style = roman

just = left

vjust = bottom;

end;

run; quit;

ods tagsets.excelxp file='~path\class.xls' options(doc='help' autofilter='1' Frozen_Headers='yes') style=XLsansPrinter;

proc print data= sashelp.class ;

var name age height weight ;

run;

ods _all_ close;

Hope this helps you.

Thanks,

Jag

Thanks,
Jag
Contributor
Posts: 74

Re: ODS tagsets.excelxp question

Thanks Jag, I have this working.  Another question... do you know if you can make the header labels all in upper case with one of the style options.  I have searched for information and am not finding it.

Thanks,

Cindy

Super User
Posts: 9,878

Re: ODS tagsets.excelxp question

Post it at ODS and Base Reporting

You can add a style into it like:

style(header)={just=center}

Contributor
Posts: 74

Re: ODS tagsets.excelxp question

where would I place this line in the code I posted?

Super User
Posts: 9,878

Re: ODS tagsets.excelxp question

Post it at ODS and Base Reporting

Cynthia will give you answer . Did you try the code offered by Jag. It looks like good .

Ask a Question
Discussion stats
  • 5 replies
  • 348 views
  • 1 like
  • 3 in conversation