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
 Columns long name in multiple rows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Clairekun

Germany
175 Posts

Posted - 04/30/2019 :  06:17:58 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 9.2
Operating System: Windows 10

Hello,

I have little knowledge of Labtalk so please excuse me if what I'm asking is absurd.

I have txt files with multiple header lines. Column names are in different rows (one row per column name), as in:

L10 Mass (mg)
L11 Area (cm^2)
L12 Temperature (K)

I have not been able to find how to set column long name and units when the structure is like the one above. Is there any way to refer names and units to different lines, or do I have to type them manually using col(A)[L]$ = "Mass" and such?

There is another issue I would like to address (please tell me if I have to open a new topic for this); there is a variable embedded in the metadata I would like to extract to use in calculations. I have read about defining variables within the worksheet, but couldn't find how to do this programatically. What I would need is:

L1 Reference 0.205 mg

I would need to create a column with the formula Col(A)/0.205 (number varies depending on the experiment). I know how to create new columns; but I have read about adding variables via page.info and other methods, but I would have to do this every single time I imported a data file and I would rather define the string programatically (it is always at the same line and position) to save time.

yuki_wu

896 Posts

Posted - 05/06/2019 :  05:04:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I think you probably need to import the data into worksheet first, and then loop over the columns to set the long names by script.

You can take a look at this page to see how to loop over columns:
https://www.originlab.com/doc/LabTalk/guide/Looping-Over-objs

Regards,
Yuki

OriginLab
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