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;

  • 相关阅读:
    图解C/C++多级指针与多维数组
    排序---选择排序
    排序---插入排序
    排序---希尔排序
    Merge Two Sorted Lists
    Remove Nth Node From End of List
    如何阅读Django文档?
    机器学习 第一章 绪论 笔记
    python工程实践·笔记
    Python后端开发面经
  • 原文地址:https://www.cnblogs.com/wdkshy/p/7244570.html
Copyright © 2011-2022 走看看