paper-xlsxAPI referencecell.cell
Cell
paper-xlsx 0.2.1 API reference
Describes cell associated properties.
Properties of interest include style, type, value, and address.
Cell(worksheet, row=None, column=None, value=None, style_array=None)Attributes
alignment
attributealignment= StyleDescriptor('_alignments', 'alignmentId')base_date
attributebase_dateborder
attributeborder= StyleDescriptor('_borders', 'borderId')col_idx
attributecol_idxThe numerical index of the column
column
attributecolumn= columnColumn number of this cell (1-based)
column_letter
attributecolumn_lettercomment
attributecommentReturns the comment associated with this cell
:type: openpyxl.comments.Comment
coordinate
attributecoordinateThis cell's coordinate (ex. 'A5')
data_type
attributedata_typeencoding
attributeencodingfill
attributefill= StyleDescriptor('_fills', 'fillId')font
attributefont= StyleDescriptor('_fonts', 'fontId')has_style
attributehas_stylehyperlink
attributehyperlinkReturn the hyperlink target or an empty string
internal_value
attributeinternal_valueAlways returns the value for excel.
is_date
attributeis_dateTrue if the value is formatted as a date
:type: bool
number_format
attributenumber_format= NumberFormatDescriptor()parent
attributeparent= sheetpivotButton
attributepivotButton= StyleArrayDescriptor('pivotButton')protection
attributeprotection= StyleDescriptor('_protections', 'protectionId')quotePrefix
attributequotePrefix= StyleArrayDescriptor('quotePrefix')row
attributerow= rowRow number of this cell (1-based)
style
attributestyle= NamedStyleDescriptor()style_id
attributestyle_idvalue
attributevalueGet or set the value held in the cell.
Functions
check_error
funccheck_error(value)Tries to convert Error" else N/A
paramvaluecheck_string
funccheck_string(value)Check string coding, length, and line break character
paramvalueoffset
funcoffset(row=0, column=0)Returns a cell location relative to this cell.
paramrowint= 0number of rows to offset
paramcolumnint= 0number of columns to offset