- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Scripting : Multiple tables from Excel
Writing a script to open Excel files that contain multiple sheets then do independent analysis with each individual sheet. The names and number of sheets from different Excel files can be different, so would like to write a generic code that can work on different files.
Used Open command to open the file
dt = Open ("file path");
This particular example file has three sheets, so show (dt); gives this result in log:
dt = {DataTable("Sheet 1"), DataTable("Sheet 2"), DataTable("Sheet 3")}
;
Need to assign each datatable in dt to different variables, what is the correct syntax to do that?
I tried:
dt1 = dt (1);
It did not work. dt1 essentially equals dt. show (dt1); gives this result in log:
dt1 = {DataTable("Sheet 1"), DataTable("Sheet 2"), DataTable("Sheet 3")};
Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Scripting : Multiple tables from Excel
dt seems to be a list, so reference items by using indices
dt[1]
if you have JMP16 For Each might also be helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Scripting : Multiple tables from Excel
dt seems to be a list, so reference items by using indices
dt[1]
if you have JMP16 For Each might also be helpful