Hi RW9. Right now we have no Web Report Studio. It might be coming in a few months. but nevertheless the requirement is to have an easy way to get the output shows in WRS to MS excel. I tried to enhance the macro to use different styling depening on ms excel or pdf but so far I am not lucky with the IF clause: %macro sas_generate_output(dataset=, file_name=, output=, type=); proc template; /*HTML Style*/ define style styles.mycssstylescreen; import "...sas_marko\sas_style_v01.css" screen; end; /*PDF Style*/ define style styles.mycssstyleprinter; parent=styles.mycssstyle; import "....sas_style_v01.css" print; end; run; %if &output eq excel %then %do /*Text Format applied to all columns HEADTEXT= “<STYLE> TD {MSO-NUMBER-FORMAT:\@}</STYLE>”;*/ ods &type file="C:\temp\&file_name" style=styles.mycssstyleprinter %end; %else %do ods &type file="C:\temp\&file_name" style=styles.mycssstylescreen %end; /*cssstyle="....sas_marko\sas_style_v01.css";*/ proc print data=&dataset noobs; run; ods &type close; %mend sas_generate_output; Expected %TO not found in %DO statement. If I do it without the DO the error is: ERROR 22-322: Syntax error, expecting one of the following: ;, ANCHOR, AUTHOR, BACKGROUND, BASE, BODY, BOOKMARK, BOOKMARKGEN, BOOKMARKLIST, BOX_SIZING, CLOSE, COLOR, COLUMNS, COMPRESS, CONTENTS, CSSSTYLE,...
... View more