Skip to content

replace Deprecated method merged_cell_ranges #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions pyexcel_xlsx/xlsxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ def column_iterator(self, row):


class MergedCell(object):
def __init__(self, cell_ranges_str):
topleft, bottomright = cell_ranges_str.split(':')
self.__rl, self.__cl = convert_coordinate(topleft)
self.__rh, self.__ch = convert_coordinate(bottomright)
def __init__(self, cell_ranges):
self.__rl, self.__cl = cell_ranges.bounds[:2]
self.__rh, self.__ch = cell_ranges.bounds[2:]
self.value = None

def register_cells(self, registry):
Expand Down Expand Up @@ -78,7 +77,7 @@ def __init__(self, sheet, **keywords):
self.max_column = 0
self.__sheet_max_row = sheet.max_row
self.__sheet_max_column = sheet.max_column
for ranges_str in sheet.merged_cell_ranges:
for ranges_str in sheet.merged_cells.ranges[:]:
merged_cells = MergedCell(ranges_str)
merged_cells.register_cells(self.__merged_cells)
if self.max_row < merged_cells.bottom_row():
Expand Down