قم بتعيين تعليق جدول أو قائمة كائن داخل ورقة العمل

قم بتعيين تعليق جدول أو قائمة كائن داخل ورقة العمل

يقوم نموذج التعليمات البرمجية التالي بتحميل ملفملف اكسل المصدر، يعيّن تعليق كائن الجدول أو القائمة الأول داخل ورقة العمل.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Open the template file.
Workbook workbook = new Workbook(dataDir + "source.xlsx");
// Access first worksheet.
Worksheet worksheet = workbook.Worksheets[0];
// Access first list object or table.
ListObject lstObj = worksheet.ListObjects[0];
// Set the comment of the list object
lstObj.Comment = "This is Aspose.Cells comment.";
// Save the workbook in xlsx format
workbook.Save(dataDir + "SetCommentOfTableOrListObject_out.xlsx", SaveFormat.Xlsx);