Personalizar encabezados de fila y columna
Contents
[
Hide
]
Al igual que Microsoft Excel, Aspose.Cells. GridWeb también usa encabezados o leyendas estándar para filas (números como 1, 2, 3, etc.) y columnas (alfabéticas como A, B, C, etc.). Aspose.Cells. GridWeb también permite personalizar los subtítulos. Este tema trata sobre la personalización de encabezados de filas y columnas en tiempo de ejecución mediante Aspose.Cells.GridWeb API.
Personalización del encabezado de fila
Para personalizar el encabezado o título de una fila:
- Agregue el control Aspose.Cells.GridWeb a un formulario web.
- Acceda a la hoja de trabajo en GridWorksheetCollection.
- Establezca el título de cualquier fila especificada.
Los encabezados de las filas 1 y 2 se han personalizado.
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 worksheet that is currently active | |
GridWorksheet workSheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex]; | |
// Create custom row header caption. | |
workSheet.SetRowCaption(1, "Row1"); | |
workSheet.SetRowCaption(2, "Row2"); |
Personalización del encabezado de columna
Para personalizar el encabezado o título de una columna:
- Agregue el control Aspose.Cells.GridWeb a un formulario web.
- Acceda a la hoja de trabajo en GridWorksheetCollection.
- Establezca el título de cualquier columna especificada.
Se han personalizado los encabezados de las columnas 1, 2 y 3
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 worksheet that is currently active | |
GridWorksheet workSheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex]; | |
// Creates custom column header caption. | |
workSheet.SetColumnCaption(0, "Product"); | |
workSheet.SetColumnCaption(1, "Category"); | |
workSheet.SetColumnCaption(2, "Price"); |