def write_mergecells(ws): """Write merged cells to xml.""" merged = [MergeCell(str(ref)) for ref in ws.merged_cells] if merged: return MergeCells(mergeCell=merged).to_tree()
def write_mergecells(worksheet): """Write merged cells to xml.""" merged = [MergeCell(ref) for ref in worksheet._merged_cells] if merged: return MergeCells(mergeCell=merged).to_tree()
def parse_merge(self, element): merged = MergeCells.from_tree(element) self.ws.merged_cells.ranges = merged.mergeCell
def parse_merge(self, element): merged = MergeCells.from_tree(element) self.ws.merged_cells.ranges = merged.mergeCell for cr in merged.mergeCell: self.ws._clean_merge_range(cr)
def parse_merge(self, element): merged = MergeCells.from_tree(element) for c in merged.mergeCell: self.ws.merge_cells(c.ref)