你好,
我正在嘗試創建一個 jsl 腳本,用戶可以在其中鍵入文件名並將其另存為 csv。
這是我嘗試過的。 當我輸入變量 exE 時,Save() 不起作用。 有什麼建議麼?
dt = Current Data Table();
current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );
Pref( Export Settings( End Of Field( Comma ), Export Table Headers( 1 ) ) );
exC = ".cvs";
Nw = new window(""
,<< modal(),
Text box ("Enter File name"),
input = Text edit box("", << Set width(100));,
Spacer Box( Size( 20, 10 ) ),
Buttonbox("Export", path = pickDirectory("Select the folder to save .CSV file:");
aa = input << get text();
exE = Concat( aa, exC );
)
);
save( path || "\" || exE ); ///
Eval( Parse( "pref(" || current_pref || ")" ) );exC 在模態窗口中無法識別,因此簡單的修復如下
dt = Current Data Table();
current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );
Pref( Export Settings( End Of Field( Comma ), Export Table Headers( 1 ) ) );
exC = ".cvs";
Nw = New Window( "",
<<MODAL></MODAL>