Page 1 of 1

Method TXlsWorkSheet.DeleteRows does not work

Posted: Fri Nov 01, 2013 11:49 pm
by marius
Hello Lars,

I stumbled on a other problem, the DeleteRows does not seem to work.

You can reuse the sample i send to you, just replace the (only) line in the TfrmMain.btnCopyClick with this.
XLS[0].InsertRows(10, 5);
XLS[0].InsertRows(10, 5);
XLS[0].DeleteRows(10, 5);
XLS[0].DeleteRows(10, 5);

Regards,
Marius

Re: Method TXlsWorkSheet.DeleteRows does not work

Posted: Mon Nov 04, 2013 1:25 pm
by larsa
Hello

The second parameter of DeleteRows is not a number of rows, it's a row number.
The correct code for your sample is:

Code: Select all

XLS[0].InsertRows(10, 5);
XLS[0].InsertRows(10, 5);
XLS[0].DeleteRows(10, 14);
XLS[0].DeleteRows(10, 14);

Re: Method TXlsWorkSheet.DeleteRows does not work

Posted: Mon Nov 04, 2013 9:20 pm
by marius
Whoops, I automaticly assumed the same parameters, its not as consistent as i thought ;)

Sorry for the disturbance
Marius