Errore durante l'apertura del file Excel quando si utilizza la variabile percorso.Sto provando ad aprire un file Excel usando la variabile di percorso "$Input_File" come di seguito. Quando eseguo lo script ricevo un errore di valutazione. Lo script funziona bene quando eseguo lo script con il percorso del file stesso anziché usando la variabile di percorso. Qualcuno può suggerire perché ciò accade e come risolvere? Utilizzo JMP Pro 17.
Set Path Variable("Input_File", Pick File());
<BR />dt = Open(
"$Input_File",
Worksheets({"Experiment Details"}),
Use for all sheets( 0 ),
Concatenate Worksheets( 1 ),
Create Concatenation Column( 1 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 2 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
);
dt << Set Name("Exp_Details_1.jmp");Automazione e scriptingR: Errore durante l'apertura del file Excel quando si utilizza la variabile percorso.Devi usare
file = get path variable("Input_File")
per ottenere il valore impostato dal file Pick.
Quindi utilizzare:
dt = Open(
file,
Worksheets({"Experiment Details"}),
Use for all sheets( 0 ),
Concatenate Worksheets( 1 ),
Create Concatenation Column( 1 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 2 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
);
dt << Set Name("Exp_Details_1.jmp");