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

OndrejMM

Australia
81 Posts

Posted - 07/14/2008 :  03:12:49 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi Guys,

just a stupid question, how can I copy Xth (1st) row from many worksheet to a new worksheet,...

I've started as follows but I have a problem there,...

doc -cw data; // count test worksheets
loop(i,1,count) {

win -a data$(i); // activate next wks
work -s 0 1 0 1;
menu -e 57634; // execute Edit> Copy
win -a newdata;

how can I now select the first empty row in worksheet "newdata"???

menu -e 57637; // execute Edit> Paste
};

is this really the easist way? not sure if thre is not any other error,...

Many Thanks
Ondrej


VincentLiu

China
Posts

Posted - 07/15/2008 :  04:24:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi OndrejMM,

You may try following code to get you want.

doc -cw data;
iRow = 1; //The ith row of the new worksheet
loop(i,1,count)
{
   win -a data$(i); // activate next wks
   nCol = wks.nCols; 
   loop(jj,1,nCol)
   {		
     %(newdata,$(jj),$(iRow)) = %(%H,$(jj),1); //copy the 1st row to the newdata wks
   }
  iRow = iRow + 1; //The next row of the newdata worksheet.

}

Regards,
Vincent
OriginLab Technical Services
Go to Top of Page

OndrejMM

Australia
81 Posts

Posted - 07/16/2008 :  8:44:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Vincent,

many thanks for your help,...
Ondrej
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