Hi @SASnewbie2
Please try the following code, using PROC REPORT, to add "total" in the first column.
I am not sure to understand what you want to display in the title after "as". Could you please specify?
Best,
ODS EXCEL OPTIONS(AUTOFILTER="1-5" SHEET_NAME = "TERMINAL COMPARISON" EMBEDDED_TITLES='YES');
proc report data=sashelp.class (obs=5) nowd style(header)={backgroundcolor=lightblue fontweight=bold};
title j = left "THE FIRST FIVE OBSERVATIONS OUT OF 19 AS AT %TRIM(%QSYSFUNC(DATE(), NLDATE20.))";
column Name Sex Age Height Weight;
define Name / display;
define Sex / display;
define Age / analysis; /* <--- specify analysis if you want to compute the total */
define Height / display;
define Weight / display;
rbreak after / summarize style={backgroundcolor=lightblue};
compute after;
if _BREAK_ = "_RBREAK_" then do;
Name="Total";
/* Specify _c3_ as "age" is the 3rd column in the report */
call define ('_c3_','style','style={BORDERBOTTOMSTYLE=SOLID BORDERTOPSTYLE=SOLID}');
end;
endcomp;
run;
ODS EXCEL CLOSE;
... View more