2016-11-09 124 views
1

我需要您的幫助!SAS - Ods tagsets.excelxp&proc報告 - 未與中心對齊的公式列

我試圖用proc報告在SAS中創建輸出。 儘管我在選項center_vertical & center_horizo​​ntal中使用,如下所示,輸出中的「失敗規則」(計算出來的)列不居中,但與左邊對齊。 任何人都可以幫忙嗎?

options missing = ""; 
ods listing close; 
ods tagsets.excelxp style=mystyle file="./Pre-Model_Diagnostic_&ProjectName..xml" 
options(Sheet_Name="Pre-Model Diagnostic" hidden_columns="&HideCol" 
     autofit_height='yes' autofilter='all' frozen_rowheaders='2' frozen_headers='yes' width_fudge='1.25' center_vertical='yes' center_horizontal='yes') 

. 
. 
. 
. 
    define OverallRule_Fail /"Fail/Rule" center ; 
    define OverallRule_Watch /"Warning/Rule" center ; 
    define FailingRule /"Failing/Rule" center style(column)={tagattr='Formula:RC[-2]&char(10)&RC[-1]'} ; 

compute FailingRule; 
if missing(OverallRule_Fail)=0 
then call define(_col_,"style","style={background=%RGBHEX(210,073,042) foreground='black' fontfamily=calibri}"); 
else if missing(OverallRule_Fail)=1 and missing(OverallRule_Watch)=0 
then call define(_col_,"style","style={background=%RGBHEX(238,182,169) foreground='black' fontfamily=calibri}"); 
endcomp; 

回答

0

使FailingRule成爲字符字段。

compute FailingRule /character length=20; 

這似乎讓它爲我工作。

+0

Thanx !!!它工作得很好! –