[]
        
(Showing Draft Content)

Removing a Row or Column

You can remove one or more columns or rows from a sheet. You can use the RemoveRowsmethod and RemoveColumns of the class to remove row and column in the sheet.

If you simply want to hide the row or column from the end user, but not remove it from the sheet, kindly refer to Showing or Hiding a Row or Column.

Using a Shortcut

  • Call the RemoveRows or RemoveColumns method for the Sheets shortcut object.

  • Set the row or column parameter to specify the row or column before which to remove the rows or columns.

  • Set the count parameter to specify the number of rows or columns to remove.

Example

This example code removes two columns before 7th column.

fpSpread1.Sheets[0].RemoveColumns(6,2);
FpSpread1.Sheets(0).RemoveColumns(6,2)

Method to set

  1. Call the RemoveRows or RemoveColumns method for a SheetView object.

  2. Set the row or column parameter to specify the row or column before which to remove the rows or columns.

  3. Set the count parameter to specify the number of rows or columns to remove.

Example

This example code removes two columns before 7th column.

FarPoint.Win.Spread.SheetView Sheet0;
Sheet0 = fpSpread1.Sheets[0];
Sheet0.RemoveColumns(6,2);
Dim Sheet0 As FarPoint.Win.Spread.SheetView
Sheet0 = fpSpread1.Sheets(0)
Sheet0.RemoveColumns(6, 2)

Using the Spread Designer

  1. Select the sheet tab for the sheet for which you want to remove a row or column.

  2. Select the row(s) or column(s) to remove by selecting the header(s).

  3. Right-click on the row or column and choose Delete.

  4. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.

See Also

Rows and Columns

Customizing the Number of Rows or Columns

Adding a Row or Column

Showing or Hiding a Row or Column

Setting the Row Height or Column Width

Setting Fixed (Frozen) Rows or Columns

Moving Rows or Columns

Creating Alternating Rows

Setting up Preview Rows

Input Data in Rows or Columns

Rows or Columns That Have Data

Adding a Tag to a Row or Column