Tablo veya Liste Nesnesinin Yorumunu Ayarlama

Çalışma Sayfasında Tablo veya Liste Nesnesinin Yorumunu Ayarlama

Lütfen çalışma sayfasının içindeki Tablo veya Liste Nesnesinin açıklamasını şunu kullanarak ayarlayın:ListObject.CommentEmlak. Yorum, xl/tables/tableName.xml dosyası içinde görünür olacaktır.

Aşağıdaki örnek kod,kaynak excel dosyası, çalışma sayfasındaki ilk tablonun veya liste nesnesinin yorumunu ayarlar ve ekran görüntüsü bu kod tarafından oluşturulan yorumu kırmızı dikdörtgen içinde gösterir.

yapılacaklar:resim_alternatif_metin

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getSharedDataDir(SettheCommentofTableorListObject.class) + "tables/";
// Open the template file.
Workbook workbook = new Workbook(dataDir + "source.xlsx");
// Access first worksheet.
Worksheet worksheet = workbook.getWorksheets().get(0);
// Access first list object or table.
ListObject lstObj = worksheet.getListObjects().get(0);
// Set the comment of the list object
lstObj.setComment("This is Aspose.Cells comment.");
// Save the workbook in xlsx format
workbook.save(dataDir + "STheCofTOrListObject_out.xlsx", SaveFormat.XLSX);