Deletes a row from a worksheet.
The number of rows in a worksheet is unchanged - 1,048,576. When you delete rows, the equivalent number of new rows is automatically added to the end of the worksheet's row collection.
If you need to delete only the cell content or formatting from rows without removing entire rows from the worksheet, use the Clear* methods of the Worksheet object (see the How to: Clear Cells of Content, Formatting, Hyperlinks and Comments example).
This example demonstrates how to remove rows from a worksheet.
When you delete rows from a worksheet, other rows are automatically shifted up.
A complete sample project is available at https://github.com/DevExpress-Examples/spreadsheet-document-server-api-e4339
// Delete the 2nd row from the worksheet. worksheet.Rows.Delete(); // Delete the 3rd row from the worksheet. worksheet.Rows.Remove(2); // Delete three rows from the worksheet starting from the 10th row. worksheet.Rows.Remove(9, 3); // Delete a row that contains the "B2"cell. worksheet.DeleteCells(worksheet.Cells["B2"], DeleteMode.EntireRow);