全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1898 1
2014-12-20
请教一下,如果使用tagsets.excelxp在同一个excel的同一张sheet中输出多个不同的数据集??谢谢~~~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-12-21 21:28:34
试下这个:
Use the SHEET_NAME= and SHEET_INTERVAL= options to specify the name of a worksheet as well as the interval in which to create new worksheets.

ods tagsets.excelxp file='multitable.xml' style=statistical
      options(auto_subtotals='yes' default_column_width='7, 10, 10, 7, 7'
              frozen_rowheaders='yes' sheet_interval='none' sheet_name='Canada'
              autofilter='all' autofilter_table='2');

  *;
  *  The output from the following two procs will be in a single worksheet
  *  with a user-specified name of 'Canada'.
  *;

  proc tabulate data=prdsale;
     where country eq 'CANADA' and year eq 1993;
     var predict actual;
     class region division prodtype;
     table
        region*(division*prodtype all={label='Division Total'}) all={label='Grand Total'},
        predict={label='Total Predicted Sales'}*f=dollar10.*sum={label=''}
        actual={label='Total Actual Sales'}*f=dollar10.*sum={label=''};
  run; quit;

  proc print data=prdsale noobs label split='*';
     where country eq 'CANADA' and year eq 1993;
     id country region division;
     var prodtype product quarter month year;
     sum predict / style={tagattr='format:Currency'};
     sum actual / style={tagattr='format:Currency'};
     sum difference / style={tagattr='format:Currency formula:RC[-1]-RC[-2]'};
     label prodtype = 'Product*Type'
           predict  = 'Predicted*Sales'
           actual   = 'Actual*Sales';
  run; quit;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群