The SAS Output Delivery System and reporting techniques

PIVOT table using SAS - ods tagsets.tableeditor segmenting groups

Accepted Solution Solved
Reply
Frequent Contributor
Frequent Contributor
Posts: 139
Accepted Solution

PIVOT table using SAS - ods tagsets.tableeditor segmenting groups

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";

 

 

 


Accepted Solutions
Solution
‎10-21-2015 05:15 PM
SAS Super FREQ
Posts: 8,868

Re: PIVOT table using SAS - ods tagsets.tableeditor segmenting groups

Hi:

  I recommend opening a track with Tech Support on this.

cynthia

View solution in original post


All Replies
Solution
‎10-21-2015 05:15 PM
SAS Super FREQ
Posts: 8,868

Re: PIVOT table using SAS - ods tagsets.tableeditor segmenting groups

Hi:

  I recommend opening a track with Tech Support on this.

cynthia

Frequent Contributor
Frequent Contributor
Posts: 139

Re: PIVOT table using SAS - ods tagsets.tableeditor segmenting groups

Posted in reply to Cynthia_sas

Ok-Thanks

 

Lawrence

 

 

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 468 views
  • 0 likes
  • 2 in conversation