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
 rename worksheet name by filename

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
Catweezle Posted - 06/23/2005 : 07:32:24 AM
Origin Version (Select Help-->About Origin):
Operating System: Windows XP Pro

Hy all,

at first I'm sorry for my not perfect english and i hope, that you can understand "this" english.

I use ORIGIN 7 and labtalk for writing scripts.
I have the following problem / question :

I have some ASCII files with the filenames like "12062005P2A2_1.ASC". After importing the Asci files, the name of the worksheet is for example A12062005P2A2, but I would be happy if the worksheet name would be 12062005P2A2_1 and a other worksheet name 12062005P2A2_2 and so on.

How can I acchieve this ?

I would be happy, if somebody can help me.

Sorry, I'm new in this forum. So I lke to say hallo to all.

thanks
3   L A T E S T    R E P L I E S    (Newest First)
Catweezle Posted - 06/24/2005 : 07:54:14 AM
Hy Leo and Mike,

thank you very much for your help. I renamed the filenames and after running my script, Origin showed the original filename at the worksheet, great ;-)

In the future I will save my data with a easier filename; so I will have less problems with importing files.

But I have another question. I would like to delete some columns in a worksheet,more precisely every third column. The columns named as C1(y), C2(y)...C30(y). For my analysis it would be good, when every third column would be deleted and every second column marked as X.
Also it would be fine to build a difference beetwen two worksheets with for example 10coulmns. How can I write this in Labtalk ?
I am sorry for this maybe easy questions, but I am a beginner and I need this for the analysis in my study, and i have less time at the moment for learning labtalk.

I would be happy if you can help me.

Thank you very much and have a nice sunny day.
Mike Buess Posted - 06/23/2005 : 10:32:20 AM
Origin's old Import ASCII method automatically labels the worksheet window with the file name. Unfortunately, the wks label does not show by default. Select Window > Rename and select Both Name and Label as Leo suggests. Then right-click on the title bar of the worksheet and select Save Template. In the future the title bar will show the file name by default if you use the Import ASCII method. If that works it would probably be best to let Origin name the window to avoid the Renaming dialog when you import the same file more than once.

Mike Buess
Origin WebRing Member
Leo_Li Posted - 06/23/2005 : 08:51:33 AM
Deasr Catweezle,

Origin doesn't allow the '_' (or space, |, @, #, %, etc) in the worksheet name. In Labtalk script language, Origin will recognize the character after the '_' as the name of column. For example, "Data1_b" denotes the column "B" of Worksheet "Data1". For the same reason, window names must begin with a letter, which is required by compiler for programming.

But you can achieve your preference by using the label of a worksheet window. To do it, right click on the worksheet title bar; select "Rename..." in the menu; check "Both Name and Label" option, and fill 1, 2, or 3 in the label field. In this way, your window name appears to be something like "A12062005P2A2 - 1" etc.

Please note the label of a window can contain spaces or special characters, and is not limited in length.

Leo
OriginLab

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