This script will help in a slightly different scenario (need to change "Wetterdaten.jmp" with the appropriate one as well the settings, best use the source script for the initial report):
If you update your table like Byron suggested you will keep the table properties but you will overwrite any data cleaning steps, like recoded (overwritten) columns, or filled missing values, .... They will be overwritten by the Update table.
Getting first the number of rows of the current table, and delete them from the imported one, then concatenate the final new table will avoid that painful awakening "all your work has been destroyed through the update.
// Define current data table (current data)
dt1 = Current Data Table();
// Check number of rows in actual data table (current recorded and cleaned data)
n_rows = NRows();
// Open Excel file to read new data -> will open a new data table with the same name and all the previous and new data
dt2 = Open("Wetterdaten.xlsx",
Worksheets( {"Import Data"} ),
Use for all sheets( 1 ),
Concatenate Worksheets( 1 ),
Create Concatenation Column( 0 ),
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( 0 ),
Replicated Spanned Rows( 1 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 )
)
);
// Delete in dt2 all previous worked on data using the n_rows information
dt2 << DeleteRows(1::n_rows);
// Concatenate tables: dt2 appended to dt1, so you avoid creating a new table
dt1 << Concatenate (dt2, Append to first table);
// Close support table dt2
Close(dt2);
Of course you can feel free to further customize this script. E.g. I would go for a general import routine, where I chenge the setting for the Excel Import to the original number + the current number of rows already beeing imported. With this you can directly go to concatenate without the need for deleting rows. And I do not like hardcoded tablenames, so I would first check the table name and use this as table name in the Excel Import.
Just few thoughts ... :)
excelFile = "Wetterdaten.xlsx";
cdt = Current Data Table();
cdtName = cdt << get name();
n_Rows = NRows();
dtHelp = Open(
excelFile,
Worksheets( {eval(cdtName)} ),
Use for all sheets( 1 ),
Concatenate Worksheets( 1 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2+ n_Rows ),
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 )
), Invisible
);
cdt << Concatenate (dtHelp, Append to first table);
Close(dtHelp);
/****NeverStopLearning****/