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
 Setting Cell Values

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
gkbradshaw Posted - 04/14/2011 : 12:13:37 AM
Origin Ver. 8.1 and Service Release 8.1.88.89
Operating System: Windows XP

I'm very new to Origin and I guess I'm still stuck in my ways of using Excel somewhat. I found this code here that find the x- and y-axis crossings of a line by typing this into the command window:
range r1 = [Book1]Sheet1!col(1);
range r2 = [Book1]Sheet1!col(2);
r2(0)=;
r1(0, r2)=;

This code works great, but I want to set up a template to import data and have the output of this be put into the first cell of two new columns that are otherwise empty. Or if there's a better place to show this data, that's fine. The point is that my Book1 and Sheet1 names can be very long and will always change and I don't want to have to type this in manually every time I import a new data set, that would take forever... Any help on how I can manipulate individual cell values through assignment would be greatly appreciated.

G
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 04/14/2011 : 3:43:06 PM
Active elements of a range can be omitted, so if your code executes within the context of the active worksheet of the active workbook, then you can use:
range r1 = col(1);
range r2 = col(2);
col(3)[1] = r2(0);
col(3)[2] = r1(0, r2);

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