The SAS Output Delivery System and reporting techniques

Unable to get PivotFields property of Pivot Table class

Reply
Regular Learner
Posts: 1

Unable to get PivotFields property of Pivot Table class

options noxsync noxwait;
/* reference the tagset from support.sas.com */
Filename tpl url
"http://support.sas.com/rnd/base/ods/odsmarkup/tableeditor/tableeditor.tpl";

/* insert the tagset into the search path for ODS templates */
Ods path(Prepend) work.templat(update);
%include tpl;

ods tagsets.tableeditor file="C:\**\temp.html"
options(addfield="Calc1 = value1/value5"
auto_excel="yes"
excel_open="yes"
sheet_name="Data"
pivot_sheet_name="sheetname"
pivotdata="value1, value2, value3, value4, value5, Calc1"
pivotdata_caption="Value 1, Value 2, Value 3, Value 4, Value 5, Calculation 1"
pivotdata_stats="sum, sum, sum, sum, sum, sum"
pivotrow="category1, category2"
pivot_format="light1"
pivotdata_toColumns="yes"
pivotdata_fmt="#,##0~ #,##0~ #,##0~ #,##0~ #,##0~0.00%"
)
;

proc print data=sumtable1; run;

ods tagsets.tableeditor close;

 

After running this code, I receive an error: 

Unable to get PivotFields property of Pivot Table class

 

Please advise.

SAS Employee
Posts: 88

Re: Unable to get PivotFields property of Pivot Table class

Make sure that the table header names in the source worksheet and HTML table match the fields Value1-Value5 that you have included with the PivotData= option. For instance, make sure that you don't have them displayed with labels and use the actual column names in the option. The table headers should match the values specified in the  Pivotdata= option.

 

Ask a Question
Discussion stats
  • 1 reply
  • 351 views
  • 0 likes
  • 2 in conversation