I know this should be simple but for some reason I'm not getting it to work. I need my ods statement to format my export to be shaded every other color as follows. Any quick way to do this? TIA!
Thanks so much!
It might help significantly if you provide what is supposed to generate that output.
Proc Report? Other Procedure? Every single procedure without any intervention from you (likely going to be a significant amount of work though sometimes I am pleasantly surprised by SAS).
Does it need to be specific colors or change with the current ODS style used?
Here is what I am doing! And I just want it consistent shading every other color grey. It is for easier readability.
/*EXPORT TO EXCEL*/
ods path sashelp.tmplmst (read);
ods listing close;
ods results off;
ods tagsets.excelxp
FILE="FILENAME.xls"
STYLE=SansPrinter
options(sheet_interval = "none"
embedded_titles = 'yes'
sheet_name = 'P&L Only'
zoom = '80'
paper='letter'
autofit_height ='yes'
frozen_headers = '3'
fittopage = 'yes'
embedded_footnotes = 'no'
orientation = 'landscape'
pagebreaks = 'yes'
rowcolheadings = 'no'
autofilter = 'none'
suppress_bylines = 'yes');
*DATA FOR THE TEAM TOTAL TAB*;
ods tagsets.excelxp
options(sheet_interval = "none"
frozen_headers = '3'
sheet_name = 'Team Total'
absolute_column_width = '20,15,15,15,15,15,15,15,15,15,15,15,15,15,15');
proc report nowd data=final_team_total SPLIT="*" MISSING;
title1 justify=left height=17pt color="#00004d" bold
"Reporting and Analytics";
title2 justify=left height=15pt color="#00004d" bold
;
title3 justify=left height=15pt color="#00004d" bold
"Summary by Team/Unit";
columns
team_unit_rpt_nm savings_type_flag january february march april may june july august september october november december save_ytd ;
DEFINE team_unit_rpt_nm / display "Team Unit" ;
DEFINE savings_type_flag / display "Savings Type" ;
DEFINE january / display "January" format=dollar20.2 ;
DEFINE february / display "February" format=dollar20.2 ;
DEFINE march / display "March" format=dollar20.2 ;
DEFINE april / display "April" format=dollar20.2;
DEFINE may / display "May" format=dollar20.2;
DEFINE june / display "June" format=dollar20.2;
DEFINE July / display "July" format=dollar20.2 ;
DEFINE august / display "August" format=dollar20.2;
DEFINE september / display "September" format=dollar20.2 ;
DEFINE october / display "October" format=dollar20.2 ;
DEFINE november / display "November" format=dollar20.2 ;
DEFINE december / display "December" format=dollar20.2 ;
DEFINE save_ytd / display "YTD" format=dollar20.2;
RUN;
title1;
ODS TAGSETS.EXCELXP CLOSE;
ODS LISTING;
This code has an example
Thanks so much!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.