[3/17/2016 10:31 AM] Miao, Xian:
i download the TableEditor tagset and saved at :
\\infsas02\Staff\xmiao\SAS\tableeditor.tpl
and run this simple code:
[3/17/2016 10:32 AM] Miao, Xian:
ods tagsets.Tableeditor file="\\infsas02\Staff\xmiao\SAS\tableeditor.tpl"
options(button_text="create pivottable"
auto_excel="yes"
pivotrow="product_line"
pivotcol="quarter"
pivotdata="profit"
excel_save_file="\\infsas02\Staff\xmiao\SAS\pivot.xlsx"
quit="no"
);
proc print data=sashelp.orsales;
run;
ods tagsets.tableeditor close;
i got a message as below and i didn't get the pivot table in excel
WARNING: Tagset TAGSETS.TABLEEDITOR not found; the default tagset will be used instead.
NOTE: Writing TAGSETS.DEFAULT Body file: \\infsas02\Staff\xmiao\SAS\tableeditor.tpl
i am not sure what's wrong. Thanks!
Run the tpl code like a SAS program, consider it a program.
The FILE in the ods tagset statement should refer to your output file. You may need to tweak the options but
%include "\\infsas02\Staff\xmiao\SAS\tableeditor.tpl";
ods tagsets.Tableeditor file="\\infsas02\Staff\xmiao\SAS\sample.xls"
options(button_text="create pivottable"
auto_excel="yes"
pivotrow="product_line"
pivotcol="quarter"
pivotdata="profit"
quit="no"
);
proc print data=sashelp.orsales;
run;
ods tagsets.tableeditor close;
thank you, i ran your code, unfortunately, i got error message:
1 %_eg_hidenotesandsource;
5 %_eg_hidenotesandsource;
28
29 %include "\\infsas02\Staff\xmiao\SAS\tableeditor.tpl";
30 +<?xml version="1.0" encoding="windows-1252"?>
_
180
WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation
marks.
202 +<value>Eclipse, Kid's Clothes</value>
__________________
49
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space
between a quoted string and the succeeding identifier is recommended.
WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation
marks.
392 +<value>Orion Kid's Clothes</value>
__________________
49
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space
between a quoted string and the succeeding identifier is recommended.
WARNING: Apparent symbolic reference AMP not resolved.
536 + Shoes</value>
_____
180
WARNING: Apparent symbolic reference AMP not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.
The ZIP file with the latest version of the tagsets has many sample programs.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.