| 
 | 
 
data test; 
        a = "x123"; 
        b = " X123"; 
        c = 1; 
run; 
ods listing close;                                         
ods tagsets.ExcelXP  
    file = "\\cnbej-vsfs02\data1\Users\q823268\test_&sysdate9..xml" 
    style=sasweb; 
 
ods tagsets.ExcelXP options(sheet_name='test' orientation='landscape' embedded_titles='yes'  
        autofit_height='yes' Frozen_Headers='9' row_repeat='1-9' AutoFilter='All' FitToPage='yes'  
        Pages_FitWidth='1' Pages_FitHeight='300' zoom='70' absolute_column_width='17'); 
proc report data=test nowd headline headskip missing spacing=5 split='*'; 
 
        Columns  a b c; 
        Define a        / Display; 
        Define b        / Display; 
        Define c        / Display; 
 
        Compute a; 
                if c = 1 then call define(_COL_,"style","style=[background=green foreground=white]"); 
                else call define(_COL_,"style","style=[background=orange]"); 
        Endcomp; 
        Compute b; 
                if c = 1 then call define(_COL_,"style","style=[background=green foreground=white]"); 
                else call define(_COL_,"style","style=[background=orange]"); 
        Endcomp; 
        Compute c; 
        if c = 1 then call define(_COL_,"style","style=[background=green foreground=white]"); 
        else call define(_COL_,"style","style=[background=orange]"); 
Endcomp; 
 
Run; 
ods tagsets.ExcelXP close; 
ods listing; 
 
 
为什么出来的结果 a b颜色是orange, c是green呢 |   
 
 
 
 |