Eliminar filas y columnas

Eliminación de Filas

Para eliminar una fila de su hoja de cálculo:

  1. Agregue el control Aspose.Cells.GridWeb a un Formulario Web.
  2. Acceda a la hoja de cálculo de la que está eliminando filas.
  3. Elimine una fila de la hoja de cálculo especificando su índice de fila.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Accessing the reference of the worksheet that is currently active
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];
// Get row index entered by user
int rowIndex = Convert.ToInt16(txtRowIndex.Text.Trim());
// Delete row at specified index
sheet.Cells.DeleteRow(rowIndex);

Eliminando columnas

Para eliminar una columna de su hoja de cálculo:

  1. Agregue el control Aspose.Cells.GridWeb a un Formulario Web.
  2. Acceda a la hoja de cálculo de la que desea eliminar columnas.
  3. Elimine una columna de la hoja de cálculo especificando su índice de columna.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Accessing the reference of the worksheet that is currently active
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];
// Get column index entered by user
int columnIndex = Convert.ToInt16(txtColumnIndex.Text.Trim());
// Delete column at specified index
sheet.Cells.DeleteColumn(columnIndex);