cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
AdirZig
Level I

Open specific excel sheet without Excel import Wizard

hi,

I am trying to open specific excel worksheet using the attached function. this function works fine, but call it from button script, kind of ignore it and invoke the excel import wizard, someone know about this issue? and how can I resolve it?

 

upload_Stimuli_ButtonBox = Button Box("Upload Stimuli",
	
set script(

	// Get stimuli path
	path_to_stimuli =  Pick File( "Open Stimuli file",Input_files_path );
	SheetName = "life time";
	
	
	Open_Stimuli(path_to_stimuli,SheetName);
	
))	

 

 

 

 

//functions
Open_Stimuli = Function(
	{path_to_stimuli,SheetName},
	{},
	
	  Open(
			path_to_stimuli,
			Worksheets(SheetName),
			Use for all sheets( 0 ),
			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(  ),
				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( "-" )
			),Invisible	
		);
		
);	
1 ACCEPTED SOLUTION

Accepted Solutions
ron_horne
Super User (Alumni)

Re: Open specific excel sheet without Excel import Wizard

2 REPLIES 2
ron_horne
Super User (Alumni)

Re: Open specific excel sheet without Excel import Wizard

Re: Open specific excel sheet without Excel import Wizard

Hi AdirZig,

 

If you are running on a Windows machine, this should work as Ron describes.  If you are on a Mac, the button has an issue described in Bypass Excel Import Wizard in script.  There is a workaround explained in that post for forcing "batch" mode to bypass the Excel Wizard.

 

Brian Corcoran

JMP Development