自定义行和列标题

自定义行标题

要自定义行的标题或标题:

  1. 将 Aspose.Cells.GridWeb 控件添加到 Web 窗体。
  2. 访问 GridWorksheetCollection 中的工作表。
  3. 设置任何指定行的标题。

第 1 行和第 2 行的标题已自定义

待办事项:图片_替代_文本

// 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");

自定义列标题

要自定义列的标题或标题:

  1. 将 Aspose.Cells.GridWeb 控件添加到 Web 窗体。
  2. 访问 GridWorksheetCollection 中的工作表。
  3. 设置任何指定列的标题。

第 1、2 和 3 列的标题已自定义

待办事项:图片_替代_文本

// 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");