Hello all;
SO I am back playing with pivot tables again with the js scripts-
And the code works below. Sorry I cannot provide data. I am just trying to get a general solution.
So in this case I am excluding one jobtitle group.
What I want to do is then go back and make a pivot of that jobtitle group in the same workbook
IfI
1) Recreate the ods excel document with the same name-then it simply erases the document with the new data and pivot
2)Create a new excel document but redirect the pivot to be created in the original document then I get a JS failure
So can I simply create two pivots on two groupings?
Group A has jobtitles A,B,C
Group B has jobtitle D
And how can relabel the two parameters
pivotpage = "PRIMDC,PRIFAC" up top?
Thank you.
Lawrence
ods excel file="c:\temp\temp8.xls" options(sheet_name="providers");
proc print data=x.HRLIST;
where jobtitle ne 'CE' ;
run;
ods excel close;
options noxsync noxwait;
ods tagsets.tableeditor file="c:\temp\PivotTable3.js"
/* remember to escape the backslashes */
options(update_target="c:\\temp\\temp8.xls" doc="help"
pivot_sheet_name="Not able to order labs2"
output_type="script"
sheet_name="providers"
auto_save='yes'
pivotrow="JOBTITLE,PROVIDER"
pivotdata="LABCOUNT,NOTKPHC"
pivotdata_caption="Lab Tests,Lab Tests not in KPHC"
pivotdata_stats="sum,sum"
PIVOTDATA_TOCOLUMNS="yes"
pivot_format="medium9"
pivotpage = "PRIMDC,PRIFAC"
quit="NO"
);
data _null_;
file print;
put "test";
run;
ods tagsets.tableeditor close;
x "c:\temp\PivotTable3.js";
Hi:
I recommend opening a track with Tech Support on this.
cynthia
Ok-Thanks
Lawrence
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.