前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【SAS小知识】-001给输出的Excel单元格添加批注

【SAS小知识】-001给输出的Excel单元格添加批注

作者头像
Setup
发布2022-01-10 08:04:22
1K0
发布2022-01-10 08:04:22
举报

今日分享的小知识使用ODS Excel/tagsets.excelxp输出,如何给指定单元格添加批注。

单元格添加批注

可在Proc Report中利用flyover语句来实现,如下代码所示。

代码语言:javascript
复制
proc report data=contents_indx  headskip headline nowd  style(header)={just=c asis=on font_weight=bold font_style=italic} ;
    column ("Contents" I   LIB dsn   SheetName  Description comments  nobs );
    define  i/display "SEQ"   style=[ just=left tagattr='text' ];
    define SheetName/ display "Sheet Name"  style=[ just=left tagattr='text'];
    define Description/display "Description" style=[ just=left tagattr='text' ] ;
    define comments/computed  display "Comments" style=[ just=left tagattr='text' ] ;
    define nobs/display ;
    define nobs /  noprint;
    compute before  _PAGE_/ style = [ font_style=italic just=l font_weight=bold font_size=8pt borderbottomcolor=black borderbottomwidth=.5pt  background=white ];
    endcomp;
    compute comments ;
      if comments ne ''  and nobs ne 0 then do;
      urlstring = "#" ||strip(SheetName)|| "!A1";
      stylestring= "style=[flyover='" ||strip(comments)|| "']";
      call define(_col_, 'style', stylestring);
      call define(_col_, 'URL', urlstring);
      end;
    endcomp;
    run;

更多资源

更多Excel输出相关更多内容可见历史文章, 也可再我的网站(统计编程-云文件-Excel输出宏)上下载相关程序。

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-01-04,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 SAS程序分享号号号 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档