ضبط التعليق للجدول أو كائن القائمة داخل ورقة العمل
Contents
[
Hide
]
يرجى تعيين تعليق جدول أو كائن قائمة داخل ورقة العمل باستخدام الأسلوب ListObject.SetComment. سيكون التعليق مرئيًا داخل ملف xl/tables/tableName.xml.
ضبط التعليق للجدول أو كائن القائمة داخل ورقة العمل
يحمل الكود العيني التالي ملف Excel المصدر ويقوم بتعيين تعليق لأول جدول أو كائن قائمة داخل ورقة العمل.
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
//For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C | |
Aspose::Cells::Startup(); | |
//Path of input | |
U16String dirPath(u""); | |
//Path of output | |
U16String outPath(u""); | |
// Instantiate a Workbook object and open an Excel file | |
Workbook workbook(dirPath + u"source.xlsx"); | |
// Accessing the first worksheet in the Excel file | |
Worksheet worksheet = workbook.GetWorksheets().Get(0); | |
// Get the List objects collection in the first worksheet. | |
ListObjectCollection listObjects = worksheet.GetListObjects(); | |
// Set the comment of the first list object | |
listObjects.Get(0).SetComment(u"This is Aspose.Cells comment."); | |
// Saving the Excel file | |
workbook.Save(outPath + u"SetCommentOfTableOrListObject_out.xlsx", SaveFormat::Xlsx); | |
Aspose::Cells::Cleanup(); |