zoukankan      html  css  js  c++  java
  • sas基础系列(3)-表格标颜色示例

    以下代码可以直接在SAS执行查看效果

    ods path reset;
    ods path show;
    ods html close;
    options nodate;
    ods pdf file="ProcOdstableTable.pdf";
    title "Using PROC ODSTABLE";

    %let color1=#FFFF80; /*淡黄色*/
    %let color2=#80FF80; /*浅绿色*/
    %let color3=#DBFE8E; /*淡黄绿色*/

    proc odstable name=Base.Template.Table;
    cellstyle _row_ = 1 && _col_ = 1 as {BackgroundColor=&color1. },
    _row_ = 1 && _col_ = 2 as {BackgroundColor=&color2. },
    _row_ = 1 && _col_ = 3 as {BackgroundColor=&color3. },
    _datatype_ = "num" as {color=red},
    _datatype_ = "char" as {color=blue};
    run;

    proc sql;
    select * from sashelp.class;
    run;
    quit;
    proc odstable name=Base.Template.Table store=mystore;

    cellstyle _row_ in (16) as {BackgroundColor=Palegreen },
    _row_ in (15) as {BorderBottomStyle=Solid },
    _row_ in (14) as {BackgroundColor=Limegreen },
    mod(_row_,2) as {Background=Honeydew},
    _col_ = 1 as {Width=1.2in BorderLeftColor=Black},
    _col_ = 2 as {Width=2in},
    _col_ = 3 as {Width=.6in},
    _col_ = 4 as {Width=.5in},
    _col_ = 5 as {Width=.9in};
    run;
    ods path (prepend) Mystore;
    ods path show;
    proc sql;
    select * from sashelp.class;
    run;
    quit;

    ods pdf close;
    ods html;
    proc template;
    delete base.template.table;
    delete base.template.table / store=mystore;
    run;

    ods path reset;

  • 相关阅读:
    Informatica_(6)性能调优
    Informatica_(5)高级应用
    Informatica_(4)工作流
    Informatica_(3)组件
    Informatica_(2)第一个例子
    Informatica_(1)安装
    Linux_(4)Shell编程(下)
    Linux_(3)Shell编程(上)
    Linux_(2)基本命令(下)
    B
  • 原文地址:https://www.cnblogs.com/wdkshy/p/7244570.html
Copyright © 2011-2022 走看看