Paper Office
paper-xlsxAPI referenceworksheet.merge

MergeCell

paper-xlsx 0.2.1 API reference

MergeCell(ref=None)

Attributes

bottom

attributebottom

A list of cell coordinates that comprise the bottom of the range

bounds

attributebounds

Vertices of the range as a tuple

cells

attributecells

cols

attributecols

Return cell coordinates as columns

coord

attributecoord

Excel-style representation of the range

idx_base

attributeidx_base
= 0

left

attributeleft

A list of cell coordinates that comprise the left-side of the range

max_col

attributemax_col
= max_col

max_row

attributemax_row
= max_row

min_col

attributemin_col
= min_col

min_row

attributemin_row
= min_row

namespace

attributenamespace
= None

ref

attributeref
= CellRange.coord
attributeright

A list of cell coordinates that comprise the right-side of the range

rows

attributerows

Return cell coordinates as rows

size

attributesize

Return the size of the range as a dictionary of rows and columns.

tagname

attributetagname
= 'mergeCell'

title

attributetitle
= title

top

attributetop

A list of cell coordinates that comprise the top of the range

Functions

__contains__

func__contains__(coord)

Check whether the range contains a particular cell coordinate

paramcoord

__iter__

func__iter__()

For use as a dictionary elsewhere in the library.

expand

funcexpand(right=0, down=0, left=0, up=0)

Expand the range by the dimensions provided.

paramrightint
= 0

expand range to the right by this number of cells

paramdownint
= 0

expand range down by this number of cells

paramleftint
= 0

expand range to the left by this number of cells

paramupint
= 0

expand range up by this number of cells

from_tree

funcfrom_tree(node)

Create object from XML

paramnode

intersection

funcintersection(other)

Return a new range with cells common to this range and other

Raises

  • ValueError: if the other range doesn't intersect with this range.
paramotheropenpyxl.worksheet.cell_range.CellRange

Other sheet range.

Returns

Not annotated

the intersecting sheet range.

isdisjoint

funcisdisjoint(other)

Return True if this range has no cell in common with other. Ranges are disjoint if and only if their intersection is the empty range.

paramotheropenpyxl.worksheet.cell_range.CellRange

Other sheet range.

Returns

Not annotated

True if the range has no cells in common with other.

issubset

funcissubset(other)

Test whether every cell in this range is also in other.

paramotheropenpyxl.worksheet.cell_range.CellRange

Other sheet range

Returns

Not annotated

True if range <= other.

issuperset

funcissuperset(other)

Test whether every cell in other is in this range.

paramotheropenpyxl.worksheet.cell_range.CellRange

Other sheet range

Returns

Not annotated

True if range >= other (or other in range).

shift

funcshift(col_shift=0, row_shift=0)

Shift the focus of the range according to the shift values (col_shift, row_shift).

Raises

  • ValueError: if any row or column index < 1
paramcol_shiftint
= 0

number of columns to be moved by, can be negative

paramrow_shiftint
= 0

number of rows to be moved by, can be negative

shrink

funcshrink(right=0, bottom=0, left=0, top=0)

Shrink the range by the dimensions provided.

paramrightint
= 0

shrink range from the right by this number of cells

parambottom
= 0
paramleftint
= 0

shrink range from the left by this number of cells

paramtop
= 0

to_tree

functo_tree(tagname=None, idx=None, namespace=None)
paramtagname
= None
paramidx
= None
paramnamespace
= None

union

funcunion(other)

Return the minimal superset of this range and other. This new range will contain all cells from this range, other, and any additional cells required to form a rectangular CellRange.

paramotheropenpyxl.worksheet.cell_range.CellRange

Other sheet range.

Returns

Not annotated

a CellRange that is a superset of this and other.

On this page