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

shawn_007

Hong Kong
Posts

Posted - 04/18/2005 :  10:33:29 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin):
Operating System:

How to append a worksheet with the contents of other worksheets.
For example:
The resource worksheets are wks_resource[i].The destination worksheet is wks_destination.Each time append the the contents of wks_resource[i](RowFrom=100,RowTo=200,ColFrom=0,ColTo=1) to the wks_destination (ColFrom=0,ColTo=1).

Following are my unsuccessful codes.
void func_append()
{
Worksheet wks_results;
wks_results.Create("origin.otw", CREATE_VISIBLE_SAME);
for(i=0;i<5;i++)
{
Worksheet wks_resource(s_rawdata[i]);
wks_resource.DeleteRange(0,0,100,1);
wks_resource.DeleteRange(200,0,300,1);
Dataset ds0(wks_resource, 0);
Dataset ds1(wks_resource, 1);
vector v0(ds0);
vector v1(ds1);
Dataset dsDest0(wks_results, 0);
Dataset dsDest1(wks_results, 1);

dsDest0.Append(v0);
dsDest1.Append(v1);
}
}

greg

USA
1379 Posts

Posted - 04/18/2005 :  4:25:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Not sure what the best solution in OriginC would be. Here is a LabTalk solution for small worksheets :

data2!wks.copy(Z);
get %(data1,1) -e end;
data1!wks.paste(Z,1,end);

(Note that this is the wrong forum for this topic. Your post really belongs here :http://www.originlab.com/forum/forum.asp?FORUM_ID=12 )

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