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
View Original Published Thread

How to delete/close all data table with zero rows from workspace all at once?

Souvik
Level I
 
3 REPLIES 3
David_Burnham
Super User (Alumni)


Re: How to delete/close all data table with non zero rows from workspace at once?

Does that mean you want to keep tables open if they have zero rows?  Not sure how to do that without a script, but generally if I want to close all my tables then I go to one of my tables and from the menu select Window>Close All Data Tables.

-Dave
Souvik
Level I


Re: How to delete/close all data table with non zero rows from workspace at once?

Hello David, sorry there was a typo in the question, I want to delete/remove all the tables that are there in my workspace which has zero rows; I mean close all the empty tables at once.

Actually I have developed a script which is generating about 100 tables and some tables (about 30 suppose) will not contain any data hence empty. I want to remove those tables from workspace in order to make it look clean and also easy to navigate between tables.

I would like to know if any jsl command is there to do the operation ?
txnelson
Super User


Re: How to delete/close all data table with non zero rows from workspace at once?

There exist multiple previous discussions on this.  But, here is a simple piece of code that will do what you want:

Names Default To Here( 1 );

For( i = N Table(), i >= 1, i--,
	If( N Rows( Data Table( i ) ) == 0,
		Close( Data Table( i ), nosave )
	)
);
Jim