aspose:使用asposejar为工作表设置自定义属性

enxuqcxy  于 2021-07-06  发布在  Java
关注(0)|答案(1)|浏览(270)

如何使用aspose-cells-7将自定义属性写入工作簿中的工作表

CustomPropertyCollection custom = customProp.getCustomProperties();

下面是一段代码片段

xlpyo6sf

xlpyo6sf1#

请参阅以下使用aspose.cells for java完成任务的示例代码,以供参考:
例如
示例代码:

// Open an Excel file
Workbook workbook = new Workbook("Book1.xlsx");

// Retrieve a list of all custom document properties of the Excel file
CustomDocumentPropertyCollection customProperties = workbook.getWorksheets().getCustomDocumentProperties();

// Adding a custom document property to the Excel file
DocumentProperty publisher = customProperties.add("Publisher", "Aspose");

// Save the file
workbook.save("out1.xlsx", SaveFormat.XLSX);

另外,我在aspose担任支持开发者/传道者。

相关问题