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
 Raw Data Processing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tomst

Germany
4 Posts

Posted - 07/09/2018 :  05:38:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.2015G and Service Release 1
Operating System: Windows 7

Hello!
I wanted to automate my analysis of lab data.
Until now I was able to load the “raw data” stored in ‘*.txt’ files out of different named folders. Also it is possible to name the worksheets corresponding to the file names, as well as to extract the unit and long name information out of the header.
For the further steps I don’t know exactly how to proceed. The raw data contain measurement data of 3 separate measurement cycles in one *.txt file. At first I want to copy the different cycle-data into new worksheets named “original_worksheet_name_c1” (2,3).

Using the code

Loop (izn, 1, 3)
range zn=3; // Define range using some of the columns, 3 points to 3rd column
type "Number of rows in raw data sheet= $(zn.GetSize())";
string strCond$="zn = izn"; // Define a condition string and extract data to a new named sheet in the same book
wxt test:=strCond$ ow:="Zyklus izn"! num:=nExtRows;
type "Number of rows extracted = $(nExtRows)";


I was able to extract the range of cycle 1 (Zyklus izn).
With the “loop” command origin analyzes three worksheets, but I suppose no. 2 and 3 aren’t the orginial one.
Now I don’t know how to put the extraction process into the loop properly and how to rename it.
For further processing I guess that I could use the “doc –e” command?
Can you help me?
Thank you in advance!

yuki_wu

896 Posts

Posted - 07/09/2018 :  10:04:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If I don’t misunderstand your question, I suppose you want to split the column into multiple worksheet by row, right?

If so, I think you could try the colsplit X-Function:
https://www.originlab.com/doc/X-Function/ref/colsplit

Regards,
Yuki

OriginLab
Go to Top of Page

tomst

Germany
4 Posts

Posted - 07/10/2018 :  09:41:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

not exactly. The last row contains a condition to determine which cycle is analysed. There are three cycles summarized in one worksheet. The data of this three cycles in one sheet should be split into three sheets containing the data of one cycle each.
So, I want to split the whole worksheet (all columns) into three worksheets.
Unfortunately the wxt function seems to use only the active sheet and not the original one.
I could attach a exmaple file if this is useful.
Go to Top of Page

yuki_wu

896 Posts

Posted - 07/11/2018 :  02:35:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you think wxt function is useful, you could activate the worksheet first by:
page.active = 2; // Active worksheet by index
page.active$ = sheet3;   // Active worksheet by name

More info about how to activate a worksheet could be found in this page:
https://www.originlab.com/doc/LabTalk/guide/Worksheet-Basic-Operation#Activate_a_Worksheet

If you still have any questions, please send your file with detailed description to us via tech@originlab.com with the subject line “Attn: Yuki”

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