Apply JSL script to multiple sheets from excelSo I have an excel file with multiple sheets that have the same kind of dataframe (just different values) in each of the sheets. I was able to export a script for "Fit Y by X"
Open();
Fit Group(
Bivariate( Y( :Total_Cost ), X( :LGP1 ), Automatic Recalc( 1 ) ),
Bivariate( Y( :Total_Cost ), X( :iteration ), Automatic Recalc( 1 ) ),
Bivariate( Y( :LGP2 ), X( :LGP1 ), Automatic Recalc( 1 ) ),
Bivariate( Y( :LGP2 ), X( :iteration ), Automatic Recalc( 1 ) ),
<<{Arrange in Rows( 2 )}
)I'm using this script to call from python using subprocess.call([, ]).
When I execute the python code, I select my excel file and the script is being applied to only the first sheet whereas I want it to apply on all the sheets. Could someone help how I can achieve that?
I'm using JMP14 and python3 to do the above.
Automation and ScriptingRe: Apply JSL script to multiple sheets from excelIf the
Open();
is opening all of the sheets, then the below should do what you want.
names default to here( 1 );
Open();
For( i = 1, i <= N Table(), i++,
Data Table( i ) << Fit Group(
Bivariate( Y( :Total_Cost ), X( :LGP1 ), Automatic Recalc( 1 ) ),
Bivariate( Y( :Total_Cost ), X( :iteration ), Automatic Recalc( 1 ) ),
Bivariate( Y( :LGP2 ), X( :LGP1 ), Automatic Recalc( 1 ) ),
Bivariate( Y( :LGP2 ), X( :iteration ), Automatic Recalc( 1 ) ),
<<{Arrange in Rows( 2 )}
)
);