SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 2442|回复: 1
打印 上一主题 下一主题

求助! sas report中关于compute的问题

[复制链接]

1

主题

1

帖子

9

积分

新手上路

Rank: 1

积分
9
跳转到指定楼层
楼主
发表于 2016-7-26 09:19:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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呢

点评

海!外直播 t.cn/RxmJTRS 禁闻视频 t.cn/RxlbueK 如果没有防火墙,魏则西只需要在谷歌、维基百科搜索一下,就会知道什么是生物免疫疗法,至少他不会受骗而耽误治疗。从这点上说,GFW的确是杀人的同谋..   发表于 2017-5-1 09:55
分享到:  微信微信
收藏收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2025-5-1 18:28 , Processed in 0.073325 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表