0
ods listing close;
ods tagsets.excelxp file='Y:\fonts\CC_ACQ_fonts_v2_har.xls' style=sasweb
options(sheet_name="CC_ACQ_JUN12_V2");
proc report data=work.matrix_input nowd
 style(report)={font_face=times font_size=1 font_weight=bold bordercolor=black}
 style(header)={font_face="Times New Roman" font_size=8pt  font_face=times    cellwidth=1in background=gray foreground=black font_weight=bold bordercolor=black  }
 style(column)={font_face="Times New Roman" font_size=8pt 
         just=center cellheight=15in font_face=times};
 column CELL offer_description pop product;
 run;
ods tagsets.excelxp close;
ods listing;

Excelの最初の列がCELLであることを知っているCELL(列名)の上に知っているBY:CELL(別のセルに)と上に書きたいoffer_description pop product(3列)上にあるTOTAL Consilodate Mail)を背景に緑色で書きたい

4

1 に答える 1

0

これは機能するはずです。基本的に、ACROSS変数を使用して2番目のヘッダーを取得し、動作させるために非印刷ダミー列を配置する必要があります(完全にACROSS変数を持つことはできません)。スタイルステートメントで色を入れることができます。PROC TEMPLATEを使用してスタイルを定義すると、コードがすっきりと見えるので、スタイルの継承を使用して、スタイルを何度も書き直さないようにすることができます。

data class;
set sashelp.class;
total='Total Consolidated';
namedummy='By Name';
dummy=' ';
run;

ods listing close;
ods tagsets.excelxp file='c:\temp\test.xml' style=sasweb
options(sheet_name="CC_ACQ_JUN12_V2");
proc report data=class nowd
 style(report)={font_face=times font_size=1 font_weight=bold bordercolor=black}
 style(header)={font_face="Times New Roman" font_size=8pt  font_face=times    cellwidth=1in background=gray foreground=black font_weight=bold bordercolor=black  }
 style(column)={font_face="Times New Roman" font_size=8pt 
         just=center cellheight=15in font_face=times};
 column dummy namedummy,name total,(age height weight);
define total/' ' across style={font_face="Times New Roman" font_size=8pt  font_face=times    cellwidth=1in background=green foreground=black font_weight=bold bordercolor=black };
 define namedummy/' ' across;
 define dummy/noprint;
 run;
ods tagsets.excelxp close;
ods listing;
于 2012-09-05T13:24:54.477 に答える