BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LB
Quartz | Level 8 LB
Quartz | Level 8

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  I recommend opening a track with Tech Support on this.

cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  I recommend opening a track with Tech Support on this.

cynthia

LB
Quartz | Level 8 LB
Quartz | Level 8

Ok-Thanks

 

Lawrence

 

 

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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