BookmarkSubscribeRSS Feed
deleted_user
Not applicable
How can I underline my summary line at each break?

SAS 9.1.3 Excel XP tagset (SAS 9.1.3, v1.28, 08/29/05)
(processing mainframe to PC)

ODS TAGSETS.EXCELXP FILE=NETINT TRANTAB=ASCII
OPTIONS(EMBEDDED_TITLES='YES'
SHEET_NAME='WEEKLY' FROZEN_HEADERS='3');
RUN;
PROC REPORT NOWD DATA=W_W
STYLE(HEADER)={FOREGROUND=BLACK FONT_SIZE=3 JUST=C}
STYLE(COLUMN)={FOREGROUND=BLACK BACKGROUND=WHITE}
STYLE(SUMMARY)={FOREGROUND=BLACK BACKGROUND=SILVER};
TITLE "NH WEEKLY METRO";
COLUMN MARKET NAME REPORTING COUNTY NITHHWK1-NITHHWK4;
DEFINE MARKET / GROUP RIGHT;
DEFINE NAME / GROUP;
DEFINE REPORTING / GROUP;
DEFINE COUNTY / ORDER CENTER;
DEFINE NITHHWK1 / SUM '1 NIT';
DEFINE NITHHWK2 / SUM '2 NIT';
DEFINE NITHHWK3 / SUM '3 NIT';
DEFINE NITHHWK4 / SUM '4 NIT';
BREAK AFTER MARKET/ SUMMARIZE SUPPRESS SKIP
STYLE(SUMMARY)={FOREGROUND=BLACK};
RUN;
2 REPLIES 2
Eric_SAS
SAS Employee
There is a style attribute called text_decoration that will do what you want.
The value should be set to underline.

The only problem is that the excel tagset does not currently support text_decoration. I will look into adding it and post back with what I find.
Eric_SAS
SAS Employee
Here is an example of how it works with the tagset changes I made this morning. The example sashelp.class report is silly because I didn't order it, but it does show a lot of underlined sumary lines.

I don't see a way of attaching anything here. Send me direct email at
ODS@sas.com and I'll send you the new tagset that you'll need for this
to work.

You could avoid the style definition and do all style over-rides but this
will create more compact and efficient Excel XML.

Eric

proc template;

define style styles.mystyle;
parent = styles.default;

style myheader from header /
foreground=black
font_size=3
just=c
;
style whiteheader from header /
foreground=black
background=white
;
style silverheader from whiteheader /
background=silver
;

style summary /
foreground=BLACK
text_decoration=underline
;
end;

run;


ODS TAGSETS.EXCELXP style=mystyle FILE="test.xls"
OPTIONS(EMBEDDED_TITLES='YES'
SHEET_NAME='WEEKLY' FROZEN_HEADERS='3');
RUN;

/*
PROC REPORT NOWD DATA=W_W
STYLE(HEADER)=myheader
STYLE(COLUMN)=whiteheader
STYLE(SUMMARY)=silverheader;
TITLE "NH WEEKLY METRO";
COLUMN MARKET NAME REPORTING COUNTY NITHHWK1-NITHHWK4;
DEFINE MARKET / GROUP RIGHT;
DEFINE NAME / GROUP;
DEFINE REPORTING / GROUP;
DEFINE COUNTY / ORDER CENTER;
DEFINE NITHHWK1 / SUM '1 NIT';
DEFINE NITHHWK2 / SUM '2 NIT';
DEFINE NITHHWK3 / SUM '3 NIT';
DEFINE NITHHWK4 / SUM '4 NIT';
BREAK AFTER MARKET/ SUMMARIZE SUPPRESS SKIP
STYLE(SUMMARY)=summary;
RUN;
*/

PROC REPORT NOWD DATA=sashelp.class
STYLE(HEADER)=myheader
STYLE(COLUMN)=whiteheader
STYLE(SUMMARY)=silverheader;
TITLE "NH WEEKLY METRO";
COLUMN NAME sex age weight;
DEFINE sex / GROUP RIGHT;
DEFINE NAME / GROUP;
BREAK AFTER sex/ SUMMARIZE SUPPRESS SKIP
STYLE(SUMMARY)=summary;
RUN;


ods _all_ close;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 726 views
  • 0 likes
  • 2 in conversation