cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
john_madden
Level VI

Bypass Excel Import Wizard in script

I am trying to open a .xslx file from within an JMP application when the "OK" button of an application window is pressed. My problem is I'm finding it hard to bypass with Excel wizard window and just open directly.

 

I want the file to open in JMP using the Excel options I specify in an Open() statement. To get my Open() statement options correct, I opened the file manually and copied the Open() statement from the table's Source script, so I think all those options are right. It's a multi-worksheet excel file, and I only want one worksheet in JMP, so here's what my Open() state looks like:

Open(
	"~/Desktop/test.xlsx",
	Worksheets( "Data" ),
	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( "-" )
	)
)

Oddly, when I execute this open statement in a free-standing script, everything happens as I want: the file opens directly without the Excel Wizard pane popping up.

However, when I include the identical Open() statement as part of the script of a JMP application that I am building, I can't seem to stop the wizard pane from opening. (The Open() statement is called when I click the "OK" button of my application's user input window.)

Any ideas why this is happening and how to stop it?

10 REPLIES 10
lehaofeng
Level V

Re: Bypass Excel Import Wizard in script

I'm still having this problem with JMP 17.2 on my Mac, and my code to open the excel sheet has variables that require the user to enter the value.