Here is a mock up of a method that can be used to do what you want. There are a lot of specifics that need to added into the script, but for the most part, it should give you a good start
Names Default To Here( 1 );
// Read all the file names
files = Files In Directory( "C:\Users\MyUserName\Documents\My Data\" );
X = N Items( files );
Y = "<Path to the folder the Excel files are in >";
For( i = 1, i < X, i++,
if( right(files[i],4)==".xls",
//open jmp files for each xls files.
dt1 = Open(
Y || files[i],
Worksheets( "my xls worksheet" ),
Use for all sheets( 0 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 0 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 1 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 )
)
);
// edit and build graph for this table
j1 = New Window("The Name " || char(i), <<journal);
j2 = New Window("The Name " || char(i), <<journal);
// Move graph to be saved to the C folder to j1
j1 << journal( the display object for the graph);
// Move graph to be saved to the D folder to j2
j2 << journal( the display object for the graph);
// Save the file
j1 << save journal("path and filename.jrn");
jd << save journal("path and filename.jrn");
// Delete the various files from this iteration
j1 << close window;
j2 << close window;
close( dt1, nosave );
// close the graph window
// close the report window
);
Jim