ver Feb25thv2
fixed a latent bug w.r.t. converting int sheet index to str sheet name
This commit is contained in:
@@ -33,16 +33,25 @@ def _parse_sheet_idx(sheet_idx: Union[int, str]
|
|||||||
) -> Tuple[BOOK, str]:
|
) -> Tuple[BOOK, str]:
|
||||||
# function _parse_sheet_idx {{{ #
|
# function _parse_sheet_idx {{{ #
|
||||||
if isinstance(sheet_idx, int):
|
if isinstance(sheet_idx, int):
|
||||||
index: str = result_sheet_names[sheet_idx]
|
try:
|
||||||
|
index: str = result_sheet_names[sheet_idx]
|
||||||
|
except:
|
||||||
|
index = ""
|
||||||
book: BOOK = result
|
book: BOOK = result
|
||||||
elif sheet_idx.startswith("RI"):
|
elif sheet_idx.startswith("RI"):
|
||||||
index: str = result_sheet_names[int(sheet_idx[2:])]
|
try:
|
||||||
|
index: str = result_sheet_names[int(sheet_idx[2:])]
|
||||||
|
except:
|
||||||
|
index = ""
|
||||||
book: BOOK = result
|
book: BOOK = result
|
||||||
elif sheet_idx.startswith("RN"):
|
elif sheet_idx.startswith("RN"):
|
||||||
index: str = sheet_idx[2:]
|
index: str = sheet_idx[2:]
|
||||||
book: BOOK = result
|
book: BOOK = result
|
||||||
elif sheet_idx.startswith("EI"):
|
elif sheet_idx.startswith("EI"):
|
||||||
index: str = expected_sheet_names[int(sheet_idx[2:])]
|
try:
|
||||||
|
index: str = expected_sheet_names[int(sheet_idx[2:])]
|
||||||
|
except:
|
||||||
|
index = ""
|
||||||
book: BOOK = expected
|
book: BOOK = expected
|
||||||
elif sheet_idx.startswith("EN"):
|
elif sheet_idx.startswith("EN"):
|
||||||
index: str = sheet_idx[2:]
|
index: str = sheet_idx[2:]
|
||||||
|
|||||||
Reference in New Issue
Block a user