ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
NJGIRL
Obsidian | Level 7

Hi all,

Can anyone direct me to a former post that has example logic on how to color code Excel tabs in ODS?

The following is my code thus far: Thanks!

 

ods tagsets.ExcelXP file="&output_name" style=Printer;

ods tagsets.ExcelXP options(orientation='landscape'

autofit_height='Yes'

autofilter='all'

sheet_name="Exposure XXX"

embedded_titles='yes'

embedded_footnotes='yes'

row_repeat='7'

frozen_headers='7'

width_points='10'

width_fudge='1'

zoom='80'

scale='60'

center_horizontal='Yes'

gridlines='Yes'

print_header='&L &A &C &D &T &R Page &P of &n'

print_footer="&program_name." );

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:
For that code in the note to work, you have to download the tagset template code in the link, run that to create tagsets.ExcelXP_mod, as shown in the code. When I tried it, tabcolor= suboption worked for me with the modified tagset template, as shown below:

Cynthia_sas_0-1600181149410.png

I believe that ODS EXCEL uses the tab_color suboption. You'd have to check the documentation. When I tried this (using tab_color with ODS EXCEL), it worked for me:

Cynthia_sas_0-1600182249307.png


Cynthia

View solution in original post

4 REPLIES 4
mklangley
Lapis Lazuli | Level 10

From this SAS support page, try using the TABCOLOR option:

tabcolor='blue'
NJGIRL
Obsidian | Level 7
Darn, no luck:Unrecognized option: TABCOLORUnrecognized option: TAB_COLOR
As you can see I tried with/without the underscore.
I wonder if this is an underlying issue with the Proc Template style we are using ? ?
Cynthia_sas
SAS Super FREQ

Hi:
For that code in the note to work, you have to download the tagset template code in the link, run that to create tagsets.ExcelXP_mod, as shown in the code. When I tried it, tabcolor= suboption worked for me with the modified tagset template, as shown below:

Cynthia_sas_0-1600181149410.png

I believe that ODS EXCEL uses the tab_color suboption. You'd have to check the documentation. When I tried this (using tab_color with ODS EXCEL), it worked for me:

Cynthia_sas_0-1600182249307.png


Cynthia

NJGIRL
Obsidian | Level 7
Thanks Cynthia!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 2895 views
  • 1 like
  • 3 in conversation