The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 How to remove blank column(s) on worksheet?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hkkim Posted - 02/13/2013 : 03:58:07 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.1 SR3
Operating System: Windows XP

Hello!

I am looking for a way to delete trailing blank column(s) in worksheet after importing data. Is there any LabTalk command or X-function for it? An ordinal number of a blank column is variable. Is it can be solved by declaring "System.wks.transpDelEmptyCols=0;" before importing? But my test was failed.

Thanks.

hkki
3   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 12/10/2015 : 05:53:52 AM
Hi hkki,

How about following scripts.
ncols=wks.ncols;
for(ii=ncols;ii>=1;ii--)
{
	if (wks.col$(ii).nrows==0)
	{
		del col($(ii));
	}
	else break;
}
hkkim Posted - 02/15/2013 : 02:34:20 AM
Thanks cpyang!

I tested as your comment but it did not work. I want to know the way to delete empty last column after importing. Thanks again!

hkkim
cpyang Posted - 02/14/2013 : 5:25:59 PM
How about deleting all but one column in the worksheet before import?

Not sure if 8.1 support wks.nCols=1.

CP

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000