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
Jackie_
Level VI

add contains in the Open worksheets

Hi,

 

Is there a way to use the Contains() function to search for a specific string in the open worksheets? I want to avoid importing all the tabs and then using Contains() to find the data table list. My preference is to use the Contains() function to only import the sheet in JMP that contains the specific string.

 

Open(
	dir_path,
	Worksheets( "Test Spec & Conditions" ), // Contains( "Test") |  Contains( "Spec")
	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( "-" )
	)
);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: add contains in the Open worksheets

You can use 

Names Default To Here( 1 );
sheetList = Get Excel Worksheets( "$SAMPLE_IMPORT_DATA\Team Results.xlsx" );
Show( sheetList );

to determine what sheets exist, and then only read in the ones you want.

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: add contains in the Open worksheets

You can use 

Names Default To Here( 1 );
sheetList = Get Excel Worksheets( "$SAMPLE_IMPORT_DATA\Team Results.xlsx" );
Show( sheetList );

to determine what sheets exist, and then only read in the ones you want.

Jim