对于要以“ J”开头的人,我想将整行变成红色。这可能使用proc print吗?
ods html file=odsout style=htmlblue ;
proc print data=sashelp.class noobs label;
var name age;
run;
ods html close;
Run Code Online (Sandbox Code Playgroud)
我认为PROC PRINT不可能实现。PROC REPORT可以生成相同的输出,但是红色行。
相同:
proc report data=sashelp.class nowd;
columns name age;
run;
Run Code Online (Sandbox Code Playgroud)
带红色:
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;
Run Code Online (Sandbox Code Playgroud)
我认为使用样式定义当然会更干净一些,但是对于一次性的事情来说,这很容易。