Salut,
J'essaie de créer un script jsl où l'utilisateur peut taper le nom du fichier et enregistrer au format csv.
Voici ce que j'ai essayé. Save() ne fonctionne pas lorsque j'entre la variable exE. Aucune suggestion?
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 n'est pas reconnu dans la fenêtre modale, donc la solution simple est ci-dessous
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>