cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Markn
Level II

New data added in excel - how to refresh in JMP

My source data is in excel. I created a script to import the data with wizard into JMP and then further scripts do many things in JMP, ultimately creating graphs. And the scripts re-run just fine as long as I just look at the original data. But when I add new rows in the excel and run the scripts, the new data is not included there. I just see the same data that was in the excel when I created the scripts for the first time.

 

I have not worked for a long with JMP and never written a script of my own. 

24 REPLIES 24
txnelson
Super User

Re: New data added in excel - how to refresh in JMP

It looks like your original data table is still open in JMP.  Try closing the original table, and then rerun the script.

Jim
Markn
Level II

Re: New data added in excel - how to refresh in JMP

Thank you, I tried it but it does not seem to solve the issue. I made a simplified test with single data column in excel like this: 

 

1. I created, saved and closed excel file.

2. I opened JMP and imported the single data column from excel with wizard. 

3. I saved the script in the data table. 

4. I closed JMP (without saving actual data). 

5. I opened excel, added new rows with data, saved and closed. 

6. I opened JMP file and run the script. I still got only the original data. 

 

Below is a clip from the script. It seems that the script has fixed the original numbers as set values.

Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
)
),
New Column( "1",
Numeric,
"Continuous",
Format( "Best", 15 ),
Set Values( [2, 3, 4, 5, 6, 7, 8, 9, 10, 1000, 1000, 1000, 1000, 1000] ) 

 

 

txnelson
Super User

Re: New data added in excel - how to refresh in JMP

You state "saved the script in the data table".  What Script are you saving?

You also state "I opened JMP file and run the script. I still got only the original data".  Are you opening the JMP data table, and then running the script that you saved in the data table?  . 

Jim
Markn
Level II

Re: New data added in excel - how to refresh in JMP

I saved the the script that was generated when I imported data from the excel for the first time. I used the wizard to import the data. After that I saved the script in the data table. 

 

Yes, later on I open again the JMP data table (which has no saved data) and then I  run the script which I saved earlier in the JMP data table. And it produces only the original data. 

 

 

txnelson
Super User

Re: New data added in excel - how to refresh in JMP

I suspect the saved script has some hardwired code in it that is preventing the new data from being opened.  Could you share the saved script?

Jim
Markn
Level II

Re: New data added in excel - how to refresh in JMP

Here you are: 

 

New Table( "Sheet1",
Add Rows( 14 ),
New Script(
"Source",
Open(
"/C:/Work/OneDrive - XXXXXXXX / YYYYYYYY docs and files/JMP Script test.xlsx",
Worksheets( "Sheet1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
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 ),
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( "-" )
)
)
),
New Column( "1",
Numeric,
"Continuous",
Format( "Best", 15 ),
Set Values( [2, 3, 4, 5, 6, 7, 8, 9, 10, 1000, 1000, 1000, 1000, 1000] )
)
)

Markn
Level II

Re: New data added in excel - how to refresh in JMP

And as a clip: 

Markn_0-1701457278206.png

 

txnelson
Super User

Re: New data added in excel - how to refresh in JMP

Is the data table always only going to have 14 rows?

The new column called "1" will always only have 14 values, and they will always have the values specified in the Set Values list.

Jim
Markn
Level II

Re: New data added in excel - how to refresh in JMP

There will be more and more rows in the data table as new data is added.

I did not write the script, I only saved what was generated during the session. And at no time wizard asked if number of rows and corresponding values should be fixed.