Set the Comment of Table or List Object inside the Worksheet
Contents
[
Hide
]
Please set the comment of the Table or List Object inside the worksheet using the ListObject.SetComment method. The comment will be visible inside the xl/tables/tableName.xml file.
Set the Comment of Table or List Object inside the Worksheet
The following sample code loads the source excel file and sets the comment of the first table or list object inside the worksheet.
This file contains 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
workbook, _ := NewWorkbook_String("source.xlsx") | |
worksheets, _ := workbook.GetWorksheets() | |
worksheet, _ := worksheets.Get_Int(0) | |
listObjects, _ := worksheet.GetListObjects() | |
listObject, _ := listObjects.Get_Int(0) | |
listObject.SetComment("This is Aspose.Cells comment.") | |
workbook.Save_String("SetCommentOfTableOrListObject_out.xlsx") |