openpyxl.comments.comment_sheet module

class openpyxl.comments.comment_sheet.CommentRecord(ref='', authorId=0, guid=None, shapeId=0, text=None, commentPr=None, author=None, height=79, width=144)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

author

Values must be of type <class ‘str’>

authorId

Values must be of type <class ‘int’>

commentPr

Values must be of type <class ‘openpyxl.comments.comment_sheet.Properties’>

property content

Remove all inline formatting and stuff

classmethod from_cell(cell)[源代码]

Class method to convert cell comment

guid
ref

Values must be of type <class ‘str’>

shapeId

Values must be of type <class ‘int’>

tagname = 'comment'
text

Values must be of type <class ‘openpyxl.cell.text.Text’>

class openpyxl.comments.comment_sheet.CommentSheet(authors=None, commentList=None, extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

authors

Values must be of type <class ‘openpyxl.comments.author.AuthorList’>

commentList

Wrap a sequence in an containing object

property comments

Return a dictionary of comments keyed by coord

extLst

Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

classmethod from_comments(comments)[源代码]

Create a comment sheet from a list of comments for a particular worksheet

mime_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'
property path

Return path within the archive

tagname = 'comments'
to_tree()[源代码]
write_shapes(vml=None)[源代码]

Create the VML for comments

class openpyxl.comments.comment_sheet.Properties(locked=None, defaultSize=None, _print=None, disabled=None, uiObject=None, autoFill=None, autoLine=None, altText=None, textHAlign=None, textVAlign=None, lockText=None, justLastX=None, autoScale=None, rowHidden=None, colHidden=None, anchor=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

altText

Values must be of type <class ‘str’>

autoFill

Values must be of type <class ‘bool’>

autoLine

Values must be of type <class ‘bool’>

autoScale

Values must be of type <class ‘bool’>

colHidden

Values must be of type <class ‘bool’>

defaultSize

Values must be of type <class ‘bool’>

disabled

Values must be of type <class ‘bool’>

justLastX

Values must be of type <class ‘bool’>

lockText

Values must be of type <class ‘bool’>

locked

Values must be of type <class ‘bool’>

rowHidden

Values must be of type <class ‘bool’>

textHAlign

Value must be one of {‘distributed’, ‘left’, ‘right’, ‘justify’, ‘center’}

textVAlign

Value must be one of {‘distributed’, ‘bottom’, ‘justify’, ‘center’, ‘top’}

uiObject

Values must be of type <class ‘bool’>