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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 rename worksheet name by filename
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Catweezle

Germany
Posts

Posted - 06/23/2005 :  07:32:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Leo_Li

China
Posts

Posted - 06/23/2005 :  08:51:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 06/23/2005 :  10:32:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Catweezle

Germany
Posts

Posted - 06/24/2005 :  07:54:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000