BookmarkSubscribeRSS Feed
mick_g
Calcite | Level 5

I created a template for style;

proc template;

     define style Styles.JHTitle;

         parent = styles.statictical;

          replace colors/

              'titlebg' = "5A5D62"

              'titlefb' = "#000000";

end;

run;

quit;

ods tagsets.excelxp file = "output" style = JHTitle;

proc print data = rwork.totals;

Title "test color";

Title1 "Color test";

run;

ods tagsets.excelxp close;

When I open the file up in Excel  I get a message that says there is a problem with style.

Did I miss something in coding?  Or is there more I have to do?

Thank you so much for any help,

Mic

2 REPLIES 2
Tim_SAS
Barite | Level 11

Should 'titlebg' be "#5A5D62"? That is, shouldn't the hex digits be preceded with a #, like "titlefb"?

Cynthia_sas
SAS Super FREQ

Hi:

I agree with Tim. The color definition should start with either 'CX' -- CX5A5D62 or should start with # as in #5A5D62.

  Also, depending on your version of SAS, you either have the incorrect usage of the REPLACE statement. If you are running in SAS 9.1.3, then you would have to respecify the ENTIRE colors element list in order to correctly use the REPLACE statement. If you are using SAS 9.2, then you would be better off NOT using the REPLACE statement and using the STYLE or CLASS form of syntax.

cynthia

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!

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.

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
  • 753 views
  • 0 likes
  • 3 in conversation