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 for Programming
 LabTalk Forum
 copy row data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kdsaransh

India
89 Posts

Posted - 12/27/2014 :  07:27:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
hello,

I want to copy row1 data and place this data to row2, But the problem is that i cant find any command that copies the row data.All copy commands seem to be just for columns.

Thanks

Rajesh

lkb0221

China
497 Posts

Posted - 12/29/2014 :  10:14:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can try wrcopy XF (http://www.originlab.com/doc/X-Function/ref/wrcopy), for example:

wrcopy iw:=[book1]sheet1! ow:=[book2]sheet2! r1:=2 r2:=2 dr1:=3; // Copy the 2nd row of [book1]sheet1 to the 3rd row of [book2]sheet2


Zheng
OriginLab

Edited by - lkb0221 on 12/29/2014 10:15:34 AM
Go to Top of Page

kdsaransh

India
89 Posts

Posted - 12/29/2014 :  11:22:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much....
Go to Top of Page

kdsaransh

India
89 Posts

Posted - 04/03/2015 :  09:04:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I am using origin 9.1 and i have a small query. I have a single workbook with 3 worksheets and i want to do the followings:

1. i want to copy the 1st complete row of the 1st worksheet and paste this row values as long name in that same very workbook and worksheet.

I am trying wrcopy function , but could not do so....

2. Now i want to delete this row.
3. I want to do this for all the 3 worksheets.

Thanks in advance...
Go to Top of Page

SeanMao

China
288 Posts

Posted - 04/09/2015 :  04:22:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I guess what you are looking for is a command we called Set as Long Name.

The following script will do the job:


doc -e LW // Loop all worksheets in active workbook
	{
		worksheet -s 0 1 0 1;  // Select first row
		wks.SetAsLabel(L,-1,0,0); // Set as Long Name and 
                                          // remove first row after
	}


Give it try.

Regards!

Sean

OriginLab Tech. Service

Edited by - SeanMao on 04/09/2015 04:24:07 AM
Go to Top of Page

kdsaransh

India
89 Posts

Posted - 04/10/2015 :  03:51:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It worked,

Thanks a lot....
Go to Top of Page

kdsaransh

India
89 Posts

Posted - 04/23/2015 :  04:08:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
hello,

I am facing another problem.

I have 10 workbooks with different names. Each having only 1 worksheet. Now i want to copy 10th row from each workbook and place that value into rows of a new workbook. So the first data goes into 1st row, 2nd data into 2nd row and so on...

I am using wrcopy, but since the name of the workbook is different, i am not able to do so .

Please help.

Thanks a lot...

Edited by - kdsaransh on 04/23/2015 04:26:54 AM
Go to Top of Page

SeanMao

China
288 Posts

Posted - 04/29/2015 :  05:00:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The code is as following:


ii=1;
doc -e LB
{
wrcopy iw:=[%H]1! r1:=10 r2:=10 dr1:=$(ii) ow:=[DestinationBookName]SheetName!;
ii++;
}


Regards!

Sean
Go to Top of Page

kdsaransh

India
89 Posts

Posted - 04/29/2015 :  08:42:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot....
Go to Top of Page

ed-rod

USA
1 Posts

Posted - 04/29/2015 :  5:41:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Assuming "Shadow" is Sheet1 and "Database" is Sheet2, this seems to work for me.

[url=http://quickhealthyrecipe.blogspot.com/]healthy recipes[/url]
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