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

dimidola

Switzerland
Posts

Posted - 03/11/2011 :  11:30:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0724
Operating System: Win7

Hi, I am trying to create a sheet where I can copy the data from another sheet. The copied sheet is found in a different folder and it is renamed (from the predefined Sheet1) to the name of the txt file I import. So, I would expect my code to be:

range a = [Book3]a030!Col(c);
range b = [Book10]Sheet1!Col(b);
b = a

a030 is the name of the copied sheet.
however this doesn't work!

if I rename the sheet back to Sheet1 it works!!!

any thoughts???

also, is there a way to only copy the first 10 rows of the column???

thanks a million

cpyang

USA
1406 Posts

Posted - 03/13/2011 :  08:13:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If there is only one sheet, then use index might solve the problem.


range a = [Book3]1!Col(c)[1:10];//1st 10 rows
range b = [Book10]1!Col(b);
b = a


CP
Go to Top of Page

dimidola

Switzerland
Posts

Posted - 03/17/2011 :  04:07:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
the copying works! thanks!

however I get all rows copied :(
Go to Top of Page

greg

USA
1378 Posts

Posted - 03/17/2011 :  10:07:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
FYI : Subranges did not work in your version, but do work in 8.5:

range a = [Book3]a030!Col(c)[5:20];
range b = [Book10]Sheet1!Col(b)[10:25];
b = a;
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