def _next_row(rrange): sr = rrange.split(":") if len(sr) == 1: m = cell2tuple(sr) result = m[0] + str(int(m[1]) + 1) else: hm = cell2tuple(sr[0]) tm = cell2tuple(sr[1]) head = hm[0] + str(int(tm[1]) + 1) tail = tm[0] + str(2 * int(tm[1]) - int(hm[1]) + 1) result = ":".join([head, tail]) return result
def _next_col(crange): sr = crange.split(":") if len(sr) == 1: m = cell2tuple(crange) result = col2abc(abc2col(m[0]) + 1) + m[1] else: hm = cell2tuple(sr[0]) tm = cell2tuple(sr[1]) head = col2abc(abc2col(tm[0]) + 1) + hm[1] tail = col2abc(2 * abc2col(tm[0]) - abc2col(hm[0]) + 1) + tm[1] result = ":".join([head, tail]) return result
def set_cell(self, cell_range, value): tm = xlutils.cell2tuple(cell_range) col = xlutils.abc2col(tm[0]) row = tm[1] self._sheet.set_cell(row, col, value)