added openpyxl support
This commit is contained in:
13
coord.py
13
coord.py
@@ -1,9 +1,5 @@
|
||||
|
||||
|
||||
|
||||
import xlrd
|
||||
|
||||
|
||||
class Coord:
|
||||
def __init__(self, row, col):
|
||||
self.row = row
|
||||
@@ -17,8 +13,8 @@ class Coord:
|
||||
return Coord(self.row if row is None else row,
|
||||
self.col if col is None else col)
|
||||
|
||||
def cell(self, sh) -> "xlrd.sheet.Cell":
|
||||
return sh.cell(self.row, self.col)
|
||||
def cell(self, reader: "ExcelSheetReader") -> "TranschendentnostCell":
|
||||
return reader.cell(self.row, self.col)
|
||||
|
||||
def __repr__(self):
|
||||
import utils
|
||||
@@ -49,8 +45,9 @@ class Merged:
|
||||
def width(self):
|
||||
return self.high.col - self.low.col + 1
|
||||
|
||||
def cell(self, sh) -> "xlrd.sheet.Cell":
|
||||
return sh.cell(self.low.row, self.low.col)
|
||||
def cell(self, reader: "ExcelSheetReader") -> "TranschendentnostCell":
|
||||
return reader.cell(self.low.row, self.low.col)
|
||||
|
||||
|
||||
def is_pseudo_merged(self):
|
||||
"""Псевдо-мержнутая значит размеом 1x1, оно же если начало совпадает с концом"""
|
||||
|
||||
Reference in New Issue
Block a user