I have a JMP file that I wish to update from an Excel file every month. When I run the Source script from the original data table, I get a new table with the new data attached. HOWEVER, all the scripts I want to run to do the analysis on the updated table are in the orignial table. Can I move the scripts to the new table? Actually, I don't even want a new table. Can't JMP just append data to the existing table? If not, how do I move the scripts to the new table?
Table scripts can be moved between tables using jsl. Try the code below.
old_table = Open( "$SAMPLE_DATA/Big Class.jmp" ); // The original table
plist = old_table << Select Properties() << Get Selected Properties();
new_table = New Table( "New" ); // The updated table here
new_table << Add scripts to table( plist );
Why can't I just add data to the original table and re-run the scripts already saved to the original table? I really don't want another table which, when I try to save it, creates a new file. Also, I really have not advanced to the point of using JSL. There must be an easier way!?!?
OK, I got the impression that you used a script to open the table.
Yes, it is possible to add data to the original table, but how to do it depends on wether the newly imported data is incremental (i.e. contains all data up to date) or only new data (to be added to the old data table).
One easy way is to concatenate the old table with the newly created table:
Activate the original table and choose Concatenate from the tables menu and select the new table in the list and add it to the "data tables to be concatenated" field. Make sure to select "Append to first table" before hitting OK.
If data is incremental, delete all rows from the original table before (or after) concatenating the tables to avoid duplicate records.
(Personally, when working interactively, I often simply copy the data in excel and paste into a new or existing JMP data table instead opening excel from within JMP)