Cambiar el Tamaño de Filas y Columnas

Trabajando con la altura de las filas y el ancho de las columnas

Configuración de la altura de fila

Para configurar la altura de una fila:

  1. Agrega el control Aspose.Cells.GridWeb a tu Formulario Web.
  2. Acceda a la colección de celdas de la hoja de cálculo.
  3. Establezca la altura de todas las celdas en una fila especificada.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Get row index entered by user
int rowIndex = Convert.ToInt16(txtRowIndex.Text.Trim());
// Get row height entered by user
int rowHeight = Convert.ToInt16(txtRowHeight.Text.Trim());
// Accessing the cells collection of the worksheet that is currently active
GridCells cells = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex].Cells;
// Resize row at specified index to specified height
cells.SetRowHeight(rowIndex, rowHeight);

Configuración del ancho de columna

Para establecer el ancho de una columna:

  1. Agrega el control Aspose.Cells.GridWeb a tu Formulario Web.
  2. Acceda a la colección de celdas de la hoja de cálculo.
  3. Establezca el ancho de todas las celdas en una columna específica.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Get column index entered by user
int columnIndex = Convert.ToInt16(txtColumnIndex.Text.Trim());
// Get column width entered by user
int columnWidth = Convert.ToInt16(txtColumnWidth.Text.Trim());
// Accessing the cells collection of the worksheet that is currently active
GridCells cells = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex].Cells;
// Resize column at specified index to specified width
cells.SetColumnWidth(columnIndex, columnWidth);