openpyxl.comments.shape_writer module

class openpyxl.comments.shape_writer.ShapeWriter(comments)[源代码]

基类:object

Create VML for comments

add_comment_shape(root, idx, coord, height, width)[源代码]
add_comment_shapetype(root)[源代码]
vml = None
vml_path = None
write(root)[源代码]
openpyxl.comments.shape_writer.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.