Hi Katie,
(1)To delete the specified rows of all columns, you can use the LabTalk command mark -d, please see the example.
range bb = col(2)[10:20];
mark -d bb;//deletes row index 10 to row index 20 from the current worksheet
You also can delete every nth rows in the current worksheet, please open the following page to see the examples. http://wiki.originlab.com/~originla/howto/index.php?title=QuickHelp:How_do_I_delete_every_nth_row_or_column_from_my_worksheet
Besides, you can use the oc function deleterow to perform this project. For example,
// First worksheet in project should have 12 rows of data to see effect
int Worksheet_DeleteRow_Ex1()
{
WorksheetPage wp = Project.WorksheetPages(0);
if(!wp)
return -1;
Worksheet wks(wp.GetName());
return (int)wks.DeleteRow(11);
}
(2)To insert a row to the current worksheet, you can use this oc function, insertrow. For example,
// First worksheet in project should have 12 rows of data to see effect
int Worksheet_InsertRow_Ex1()
{
WorksheetPage wp = Project.WorksheetPages(0);
if(!wp)
return -1;
Worksheet wks(wp.GetName());
return (int)wks.InsertRow(10);
}
Any problem, please contact with us freely.
Best regards,
Shirley
Originlab Technical Service Team