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
 Insert 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

pb

Italy
8 Posts

Posted - 05/22/2002 :  1:06:48 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
how do I insert a row, at an arbitrary row number, using the script ?
Thanks
Paola

Jose

Netherlands
93 Posts

Posted - 05/22/2002 :  2:40:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try this:

insrow=10; // insert in 10th place

nrows=wks.nrows+1;

loop (ii,1,wks.ncols) { // for all columns
%a=%(%h,ii);
%a[nrows]=0/0; // insert new cell at the end
temp=%a;
copy -b insrow temp %a -b (insrow+1) -e nrows;
%(%h,ii,insrow)=0/0; // clear new row
}

del temp; del -v insrow; del -v nrows;


If you don't enclose in brackets the insrow+1 of the copy command it won't work. I don't know why.

Jose Via, Origin WebRing member

Edited by - Jose on 05/22/2002 14:41:23
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