SpreadsheetPackage class
Leave feedback
On this page
Represents a native metadata package in a spreadsheet.
Learn more:
The SpreadsheetPackage type exposes the following members:
| Method | Description |
|---|---|
| set | Adds or replaces the metadata property with the specified name. |
| set | Adds or replaces the metadata property with the specified name. |
| set | Adds or replaces the metadata property with the specified name. |
| set | Adds or replaces the metadata property with the specified name. |
| set | Adds or replaces the metadata property with the specified name. |
| set_file | |
| set_string | |
| add_properties | Adds known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. (inherited from MetadataPackage) |
| add_properties_func | (inherited from MetadataPackage) |
| clear | Removes all writable metadata properties from the package. (inherited from DocumentPackage) |
| clear_built_in_properties | Removes all built-in metadata properties. (inherited from DocumentPackage) |
| clear_custom_properties | Removes all custom metadata properties. (inherited from DocumentPackage) |
| contains | Returns True if the package contains a metadata property with the specified name; otherwise, False. (inherited from MetadataPackage) |
| contains_file | (inherited from MetadataPackage) |
| contains_string | (inherited from MetadataPackage) |
| find_properties | Finds metadata properties that satisfy the specified predicate, searching recursively through all nested packages. (inherited from MetadataPackage) |
| find_properties_func | (inherited from MetadataPackage) |
| get | (inherited from MetadataPackage) |
| get_enumerator | Returns an enumerator that iterates through the collection. (inherited from MetadataPackage) |
| get_file | (inherited from MetadataPackage) |
| get_string | (inherited from MetadataPackage) |
| remove | Removes a writable metadata property by the specified name. (inherited from DocumentPackage) |
| remove_file | (inherited from DocumentPackage) |
| remove_properties | Removes metadata properties satisfying the specified predicate. (inherited from MetadataPackage) |
| remove_properties_func | (inherited from MetadataPackage) |
| remove_string | (inherited from DocumentPackage) |
| sanitize | Removes writable metadata properties from the package, recursively affecting all nested packages. (inherited from MetadataPackage) |
| set_properties | Sets known metadata properties satisfying the specified predicate. (inherited from MetadataPackage) |
| set_properties_func | (inherited from MetadataPackage) |
| update_properties | Updates known metadata properties that satisfy the specified predicate, recursively affecting all nested packages. (inherited from MetadataPackage) |
| update_properties_func | (inherited from MetadataPackage) |
| Property | Description |
|---|---|
| author | The document author. |
| category | The category of the spreadsheet package. |
| comments | The comments of the spreadsheet package. |
| company | The company. |
| content_status | The content status. |
| content_type | The content type of the spreadsheet package. |
| content_type_properties | The metadata package containing the content type properties. |
| created_time | The created time of the document. |
| hyperlink_base | The hyperlink base. |
| keywords | The keywords of the spreadsheet package. |
| language | The document language. |
| last_printed_date | The last printed date in UTC. |
| last_saved_by | The name of the last author. |
| last_saved_time | The time of the last saving in UTC. |
| manager | The manager. |
| name_of_application | The name of application. |
| revision | The document revision number. |
| subject | The subject. |
| template | The document template name. |
| title | The title of the document. |
| total_editing_time | The total editing time in minutes. |
| version | The version number of the application that created the document. |
| count | The number of metadata properties. (inherited from MetadataPackage) |
| keys | The collection of metadata property names. (inherited from MetadataPackage) |
| know_property_descriptors | The collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. (inherited from MetadataPackage) |
| metadata_type | The metadata type of the package. (inherited from MetadataPackage) |
| property_descriptors | The collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. (inherited from MetadataPackage) |
from datetime import datetime
from groupdocs.metadata import Metadata, SpreadsheetRootPackage, Constants
metadata = Metadata(Constants.InputXlsx)
root = metadata.get_root_package(SpreadsheetRootPackage)
root.document_properties.author = "test author"
root.document_properties.created_time = datetime.now()
root.document_properties.company = "GroupDocs"
root.document_properties.category = "test category"
root.document_properties.keywords = "metadata, built-in, update"
# ...
metadata.save(Constants.OutputXlsx)
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.