WorkbookMetadata class

WorkbookMetadata class

Represents the meta data.

The WorkbookMetadata type exposes the following members:

Constructors

ConstructorDescription
__init__(self, file_name, options)Create the meta data object.
__init__(self, stream, options)Create the meta data object.

Properties

PropertyDescription
optionsGets the options of the metadata.
built_in_document_propertiesReturns a DocumentProperty collection that represents all the built-in document properties of the spreadsheet.
custom_document_propertiesReturns a DocumentProperty collection that represents all the custom document properties of the spreadsheet.

Methods

MethodDescription
save(self, file_name)Save the modified metadata to the file.
save(self, stream)Save the modified metadata to the stream.

Example

The following example creates a WorkbookMetadata.

from aspose.cells.metadata import MetadataOptions, MetadataType, WorkbookMetadata

options = MetadataOptions(MetadataType.DOCUMENT_PROPERTIES)
meta = WorkbookMetadata("book1.xlsx", options)
meta.custom_document_properties.add("test", "test")
meta.save("book2.xlsx")

See Also