1

名前が「J」で始まる人の行全体を赤くしたいと思います。これは使用して可能proc printですか?

ods html file=odsout style=htmlblue ;

proc print data=sashelp.class noobs label;  
  var name age;
run;

ods html close;
4

1 に答える 1

5

PROCPRINTでは不可能だと思います。PROC REPORTは同じ出力を生成できますが、行は赤です。

同一:

proc report data=sashelp.class nowd;
columns name age;
run;

赤で:

proc report data=sashelp.class nowd;
columns name age;
compute name;
 if substr(name,1,1)='J' then
     call define(_row_, "style", "style=[backgroundcolor=red]");
endcomp;
run;

もちろん、スタイル定義を使用する方がややクリーンだと思いますが、1回限りの場合は簡単です。

于 2013-01-18T14:45:48.593 に答える