openpyxl.packaging.core module¶
-
class
openpyxl.packaging.core.DocumentProperties(category=None, contentStatus=None, keywords=None, lastModifiedBy=None, lastPrinted=None, revision=None, version=None, created=datetime.datetime(2021, 8, 19, 10, 59, 22, 201836), creator='openpyxl', description=None, identifier=None, language=None, modified=datetime.datetime(2021, 8, 19, 10, 59, 22, 201838), subject=None, title=None)[源代码]¶ 基类:
openpyxl.descriptors.serialisable.SerialisableHigh-level properties of the document. Defined in ECMA-376 Par2 Annex D
-
category¶ Values must be of type <class ‘str’>
-
contentStatus¶ Values must be of type <class ‘str’>
-
created¶ Values must be of type <class ‘datetime.datetime’>
-
creator¶ Values must be of type <class ‘str’>
-
description¶ Values must be of type <class ‘str’>
-
identifier¶ Values must be of type <class ‘str’>
-
keywords¶ Values must be of type <class ‘str’>
-
language¶ Values must be of type <class ‘str’>
-
lastModifiedBy¶ Values must be of type <class ‘str’>
-
lastPrinted¶ Values must be of type <class ‘datetime.datetime’>
-
last_modified_by¶ Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)
-
modified¶ Values must be of type <class ‘datetime.datetime’>
-
namespace= 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'¶
-
revision¶ Values must be of type <class ‘str’>
-
subject¶ Values must be of type <class ‘str’>
-
tagname= 'coreProperties'¶
-
title¶ Values must be of type <class ‘str’>
-
version¶ Values must be of type <class ‘str’>
-
-
class
openpyxl.packaging.core.NestedDateTime(*args, **kw)[源代码]¶ 基类:
openpyxl.descriptors.base.DateTime,openpyxl.descriptors.nested.NestedText-
expected_type¶ datetime.datetime的别名
-
-
class
openpyxl.packaging.core.QualifiedDateTime(*args, **kw)[源代码]¶ 基类:
openpyxl.packaging.core.NestedDateTimeIn certain situations Excel will complain if the additional type attribute isn’t set
-
openpyxl.packaging.core.tostring(element, *, encoding='utf-8', method=None, short_empty_elements=True)¶ Generate string representation of XML element.
All subelements are included. If encoding is “unicode”, a string is returned. Otherwise a bytestring is returned.
element is an Element instance, encoding is an optional output encoding defaulting to US-ASCII, method is an optional output which can be one of “xml” (default), “html”, “text” or “c14n”.
Returns an (optionally) encoded string containing the XML data.