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
 Corresponding x-Function for "copy -a"

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
LW-HH Posted - 06/07/2013 : 05:01:57 AM
Dear all,

I think I am getting nuts.
I am trying to copy and append a large set of data in X,Y,Z column format from one worksheet to another. I do not want to creat new columns, but to append the data directly after the last value of the data in e.g. Sheet1.
All search results corresponding to my problem lead to the use of the command "copy -a", which seems not to work in my version of Origin Pro 8.5.1.
See this forum post, which exactly addresses my problem:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=4741&SearchTerms=append
Is there any function I can use from Labtalk, which does exactly the same? I tried to use a loop and does the copying by myself, but I have to much data and it slows the algorithm down a lot.

Thank you for your comments and help in advance

Windows 7 32bit
Origin Pro 8.5.1
2   L A T E S T    R E P L I E S    (Newest First)
LW-HH Posted - 06/10/2013 : 03:02:12 AM
Hi greg,

Thanks a lot for the code. I tried to include the range in the copy -a command instead of assigning them with the range command.
This seems not to work any more (it's the way described in the linked forum post and on the OriginLab Wiki).

Your example did the trick.

Cheers



Windows 7 32bit
Origin Pro 8.5.1
greg Posted - 06/07/2013 : 5:53:32 PM
Here is a script that you should be able to modify to suit your needs:

range rax1 = [Book1]Sheet1!1, ray1 = [Book1]Sheet1!2, raz1 = [Book1]Sheet1!3;
range rax2 = [Book1]Sheet2!1, ray2 = [Book1]Sheet2!2, raz2 = [Book1]Sheet2!3;
range rax3 = [Book1]Sheet3!1, ray3 = [Book1]Sheet3!2, raz3 = [Book1]Sheet3!3;
copy -a rax2 rax1;
copy -a ray2 ray1;
copy -a raz2 raz1;
copy -a rax3 rax1;
copy -a ray3 ray1;
copy -a raz3 raz1;

That script assumes all the sheets are in the same Workbook, but the range declarations can point to anywhere.

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