delete_rows method

delete_rows

Deletes several rows.

def delete_rows(self, row_index, total_rows):
    ...
ParameterTypeDescription
row_indexintThe first row index to be deleted.
total_rowsintCount of rows to be deleted.

Remarks

If the deleted range contains the top part(not whole) of the table(ListObject), the ranged could not be deleted and nothing will be done. It works in the same way with MS Excel.

delete_rows

Deletes multiple rows in the worksheet.

Returns

def delete_rows(self, row_index, total_rows, update_reference):
    ...
ParameterTypeDescription
row_indexintIndex of the first row to be deleted.
total_rowsintCount of rows to be deleted.
update_referenceboolIndicates whether update references in other worksheets.

See Also