自定义行和列标题

自定义行标题

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

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

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

todo:image_alt_text

// 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列的标题已自定义

todo:image_alt_text

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