將 JSL 腳本應用於 Excel 中的多個工作表所以我有一個包含多個工作表的 Excel 文件,每個工作表中都有相同類型的數據框(只是不同的值)。 我能夠導出“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 )}
)我正在使用此腳本使用 subprocess.call([, ]) 從 python 進行調用。
當我執行 python 代碼時,我選擇 excel 文件,並且腳本僅應用於第一個工作表,而我希望它應用於所有工作表。 有人可以幫助我如何實現這一目標嗎?
我使用 JMP14 和 python3 來執行上述操作。
自動化和腳本編寫回复:將 JSL 腳本應用於 Excel 中的多個工作表如果
Open();
打開所有工作表,那麼下面的工作表應該可以滿足您的要求。
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 )}
)
);