Hi,
I am using the below script for creating the excel pivot table. Can you please help for the below 2 issues
1) I am able to create the excel with the pivot, but I could not save the excel automatically. The excel opens and promts me to save.
Error: Unable to set the Orientation property of the PivotField class
Also I tried using excel_save_file option, before trying update_target
2) I need to suppress the sub totals and I want only the grand total
/* Create file to update */ ods tagsets.Excelxp file="c:\temp.xls" options(sheet_name="temp") ; proc print data=fin_all; run; ods tagsets.Excelxp close;
/* update the file with a simple pivot table by creating a javascript file that we execute */ options xnowait noxsync; ods noresults; ods tagsets.tableeditor file="C:\temp.js" options(output_type="script" update_target="c:\\temp.xls" sheet_name = "temp"
pivotrow="Name, ID, TGT_NOS" PIVOTDATA_TOCOLUMNS="YES" pivotpage="AREA, LOC_CD, LOCATIONNAME, product, ACTIVITY_DATE"); data _null_; file print; put "test"; run; ods tagsets.tableeditor close; /* execute Script file */ x "C:\temp.js";
... View more