cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

add contains in the Open worksheets

Jackie_
Level VI

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