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
 Set Values dialogue box problems
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Samwise

3 Posts

Posted - 07/12/2011 :  1:13:45 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver 8.1. and Service Release (Select Help-->About Origin): SR3
Operating System:xp

Im having problems with the Set Values dialog box. Specifically when trying to link data using Variables->Insert Range Variable when a row range is selected it is ignored.

range r1 = [workbook]"sheet"!B[4:6];

produces the same result as

range r1 = [workbook]"sheet"!B;

Alternative naming methods for column including col(num),wcol(num)when incorporated with the full path name also do not work.

Specifying a range when using just =col(C)(1) (within the same sheet) is not a problem however.


I was wondering if this was a known issue or a limitation placed on Governmental Licences and if not what is the procedure to fix the issue preferably with out resorting to programming.

Cheers, Sam

Hideo Fujii

USA
1582 Posts

Posted - 07/12/2011 :  4:12:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Sam,

I have tried the range notation in Set Values tool in Origin 8.1 SR3, but I couldn't reproduce the problem. What I did was as follows:

1) In Col(A) in Sheet1, Book1, entered {1, 2, 3}
2) For Col(B), I set the following in the Set Column Values:
  Before Formula Scripts: range r1 = [Book1]"sheet1"!A[2:3];
  Formula: r1+10
3) Run this tool, and got the following result correctly in Col(B): {12, 13}. (Note: If I used the formula: range r1 = [Book1]"sheet1"!A;
then I got the result {11, 12, 13} in Col(B).)

So, it seems okay. Maybe you can post the exact formula and the Before Formula Scripts here?

--Hideo Fujii
OriginLab
Go to Top of Page

Samwise

3 Posts

Posted - 07/13/2011 :  04:20:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hideo,

Thank you for your help. I applied what you did and it worked. I still encountered some problems however. Let me better describe my situation.

I have 2 work books the 1st, has 1 sheet with 3 columns and 10 rows.
eg: [workbook1]"Sheet1"!Col(A,b,c)[1:10];

The 2nd has one sheet, two columns and no data.
eg: [workbook2]"Sheet1"!Col(A,b);

I wish to import subset of workbook 1 into workbook 2.
Before formula scripts
eg: range r1=[workbook1]"Sheet1"!Col(A)[4:8];

Formula script:
r1

This ignores the row selection from the Before formula script and imports all 10 rows. However, if the Formula Script is changed to

r1+0

The imported data is only from the selected rows. Since this is a relatively simple thing to implement for mathematical data this is a sufficient solution for my purposes.

The final problem is with non mathematical data, for which this solution seems to not apply. I have tried using the other import options presented such as Set Values-> Variables-> insert info variable etc. but have had no luck with importing a column of text information from specific rows.

Thanks for your help, Sam




Edited by - Samwise on 07/13/2011 04:22:11 AM
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/13/2011 :  5:31:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Samwise,

As a workaround, could you please try the following?

1) in Before formula script, define like this:

  range r1=[book2]sheet1!col(A)[4:8];
  range r2=1;
  r2=r1;
2) leave the formula box EMPTY

This should work with no need of adding a zero etc. for the numbers as well as for the text data.

Meanwhile, I will report the issue to our developers so they can look at, and fix it in the next version.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 07/13/2011 5:38:05 PM
Go to Top of Page

Samwise

3 Posts

Posted - 07/14/2011 :  03:53:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey Hideo,
I have tried out the work around with a set of sample data and it appears to work well!
Thanks for your time and help, Sam
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