h*e 发帖数: 10233 | 1 请教一个问题。我有一个dataset要output到excel,用的是ODS, 现在有一个问题。
dataset第1*n+1行(1,4,7。。。)需要用interger format,第1*n+2行(2,5,8。
。。)需要用currency format,
第1*n+3行(3,6,9。。。)需要用% format.这个code要怎么写呢?我想用cellstyle
as,但是不知道format部分要加在哪里。高手指点一下。 | k*****u 发帖数: 1688 | | h*e 发帖数: 10233 | 3 应该用不上macro,就是ODS里的style,不过不管用啥,能output出来这个结果就成,你
知道吗? | a******n 发帖数: 11246 | 4 能不能先弄到excel里再改类型?
excel里写个macro比较容易。
【在 h*e 的大作中提到】 : 应该用不上macro,就是ODS里的style,不过不管用啥,能output出来这个结果就成,你 : 知道吗?
| h*e 发帖数: 10233 | 5 嗯,以前就是这么干的,手动作业。因为周末要回国,需要把这些report全部automate
,还要跟以前一样的format,所以这几天狂改code。呵呵
【在 a******n 的大作中提到】 : 能不能先弄到excel里再改类型? : excel里写个macro比较容易。
| l*****8 发帖数: 483 | 6 可不可以在原来的dataset里改,存在一个text field里,然后再ODS到excel 里。。
data bb;
length text_field $100.;
set your_dataset;
if mod(_N_,3)=1 then do; ***** ;end;
else if mod(_N_,3)=2 then do; text_field=put(your_field, DOLLAR8.); end;
else if mod(_N_,3)=0 then do; ****;end;
drop your_field;
rename text_field=your_field;
run; |
|