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
 Origin Forum
 Appending worksheet?

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
shawn_007 Posted - 04/18/2005 : 10:33:29 AM
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);
}
}
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 04/18/2005 : 4:25:15 PM
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 )


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