Clearing Data table and automatically execute JSL scripts upon file open
Jan 5, 2017 1:56 AM(1816 views)
I'm new to JSL scripting. Current i am working on a project when i would like to open the JMP file from VBA macro. Below are the scripts which i have google'd and found.
-- VBA Scripts which will open JMP file - S1.jmp--
Dim app As JMP.Application Dim doc As JMP.Document Set app = CreateObject("JMP.Application") app.Visible = True Set doc = app.OpenDocument("C:\Users\ABC\Desktop\S1.jmp")
So far, i am able to open S1.jmp file from VBA macro. My question is, how can i copy the data from my excel sheet into JMP each time i run it and stay at jmp file # S1.jmp? i realized when run the script at JMP, a new data table will pop up. How can i prevent the popping out new data table where else i need to let the data remain at S1.Jmp?
Use for all sheets(1),
Create Concatenation Column(0),
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)
Also, how can i automatically trigger the script with other statistical functions such as distribution plot under the same scripting?
Kindly advise how can i write a simple script to:
1.Open JMP file via VBA scripting
2.Clear S1.jmp file content
3.Import directly from VBA excel and stay at S1.jmp without the need to open another data table ( as i would like to save scripts to data table - S1.jmp)
4. Automatically execute distribution plotting ( as example)
Steps 1 to 4, is done automatically when i hit my button at VBA excel.. it will connect to JMP and perform all the necessaries function as described above.