NOTE: I am using SAS 9.4 M2 with Office 2013 Taking your original code, I modified your Proc Report syntax to the standard way I use the Procedure and I get the results I believe you are looking for on the variable MyPctWt? data Class; set SASHelp.Class; PctWt = Height/Weight; format PctWt percent8.2; run; ods excel file="d:\Temp\Test.xlsx" style=Printer; ods excel options(sheet_name='Print'); proc print data=Class; run; ods excel options(sheet_name='SQL'); proc sql; select * from Class; quit; ods excel options(sheet_name='Report'); proc report data=Class; columns Name Sex Age Height Weight PctWt MyPctWt; define PctWt / display ; define height / analysis sum; define weight / analysis sum; define MyPctWt / computed style=[tagattr="format:#,###.00%"]; compute MyPctWt; MyPctWt=height.sum /weight.sum; endcomp; run; ods excel close;
... View more