Table of Contents

Method DeleteRows

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

DeleteRows(int, int)

Deletes rows; the rows below move up.

public void DeleteRows(int at, int count = 1)

Parameters

at int

The first one-based row deleted.

count int

How many rows.

Remarks

A reference to a deleted cell becomes #REF! and a range loses the rows it covered, as in Excel. What sat on the deleted rows goes with them: merged ranges, conditional formats, validations, hyperlinks, sparklines, comments. See InsertRows(int, int, XlsxInsertOptions?) for what follows the rows that move.

Exceptions

ArgumentOutOfRangeException

The rows are not inside the grid.

InvalidOperationException

The sheet is not a worksheet.

UnsupportedFeatureException

The rows hold part of an array formula, or a table's header or totals row or all of its data rows and not the whole table, or a whole table.

InvalidDocumentException

A part of the workbook is malformed.