Author |
Topic |
|
LW-HH
Germany
4 Posts |
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 |
Edited by - LW-HH on 06/07/2013 05:02:23 AM |
|
greg
USA
1378 Posts |
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. |
|
|
LW-HH
Germany
4 Posts |
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 |
|
|
|
Topic |
|
|
|