Hi LabTalk experts, I'm just wondering which command can I use in the LabTalk script to delete an element of a column. Just exactly as clicking "Edit->Delete" after selected/highlighted that cell.
Thanks a lot!
5 L A T E S T R E P L I E S (Newest First)
Mike Buess
Posted - 07/31/2006 : 12:26:25 PM Easiest way is to select the cell you want to delete and then execute Edit > Delete with the menu -e menuID. This tip describes how to find menuID.
wo -s 1 5 1 5; // select col 1, row 5 menu -e 36442; // Delete
Posted - 07/31/2006 : 11:15:50 AM Thank you so much Mike. Your "copy" solution works well only with column containing data of the same type (all elements are numeric or text). However, if you have a column that is of the "Text&Numeric" type, and you just want to delete those cells with a certain numeric value, this "copy" solution still has a problem. All the cells with a text content would appear as "-" after running this script. Do you have any idea about how to solve this problem?
Thank you again!
Mike Buess
Posted - 07/31/2006 : 10:19:18 AM This LabTalk script deletes row nn from col A without changing other columns in the same worksheet...
nn=5; // delete row 5; get col(A) -e npt; // npt is # rows in col(A) if( nn>npt ) return; npt-=1; copy -b (nn+1) col(A) col(A) -b nn -e npt; set col(A) -e npt;
Posted - 07/31/2006 : 09:46:09 AM Thank you Deanna for your reply! However, by using "mark -d", the same rows of all the columns will be deleted. Suppose I have col(A) and col(B), how can I just delete col(A)[1] while keep col(B)[1] intact?
Thank you very much!
Deanna
Posted - 07/31/2006 : 12:28:34 AM Hi, you may use the following command: mark -d datasetrange
For example, to delete the 4th to 6th cells of Row 2, use the script window: