Eliminar filas y columnas
Contents
[
Hide
]
Este tema muestra cómo eliminar filas y columnas de una hoja de cálculo mediante Aspose.Cells.GridWeb API. Con la ayuda de esta característica, los desarrolladores pueden eliminar filas o columnas en tiempo de ejecución.
Eliminación de filas
Para eliminar una fila de su hoja de cálculo:
- Agregue el control Aspose.Cells.GridWeb a un formulario web.
- Acceda a la hoja de trabajo de la que está eliminando filas.
- Elimine una fila de la hoja de trabajo especificando su índice de fila.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Eliminación de columnas
Para eliminar una columna de su hoja de cálculo:
- Agregue el control Aspose.Cells.GridWeb a un formulario web.
- Acceda a la hoja de trabajo de la que desea eliminar columnas.
- Elimine una columna de la hoja de trabajo especificando su índice de columna.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
También puede usar los métodos DeleteRows/DeleteColumns para eliminar varias filas/columnas en las hojas de trabajo.