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
 Origin Forum
 Accessing and treating data in analysis template
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

LennartR

1 Posts

Posted - 03/20/2020 :  04:32:33 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear all,

I created an analysing template in origin, where I import an multiple ASCII-files of the same structure. These files need to be analysed and data is plotted. Therefore, I created an additional workbook where I access colums of the imported data by defining a variable in such way:
range var1 = [Book1]"Sheet1"!col("Example")
It works fine so far with the expection that I have to adapt the book name (since its changing its name by duplicating) every single time I duplicate the folder to perform the analysis on a different data set. That requires quite some manual work.
Is there a more handy way to perform that task?

Additionally, I'd like to perform average values + std. dev. of cells of multiple columns. I had only figured out to do this by applying teh formula e.g. 1/2*(var1+var2). Unfortunately, the number of ascii-files varies and I have to adapt the formula manually as well. Any tips on that?

Thank you very much for your help!
Lennart

Origin Ver. and Service Release: OriginPro 2019b
Operating System: Windows 10

YimingChen

1592 Posts

Posted - 03/20/2020 :  3:00:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

1. Anytime you create a workbook. You can use %H to get the current workbook name. So you can define range like:
range var1 = [%H]"Sheet1"!col("Example")


2. If the number of columns varies, you can always use wks.ncols to get the number of columns and loop over all columns and do averaging.

James
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