b0883c72 by 周伟奇

fix bug

1 parent 614fdf38
...@@ -313,6 +313,8 @@ class BSWorkbook(Workbook): ...@@ -313,6 +313,8 @@ class BSWorkbook(Workbook):
313 313
314 @staticmethod 314 @staticmethod
315 def rm_cn_char(row_value, pre_col, next_col): 315 def rm_cn_char(row_value, pre_col, next_col):
316 if len(row_value) <= next_col:
317 return row_value
316 row_value = list(row_value) 318 row_value = list(row_value)
317 if isinstance(row_value[pre_col], str): 319 if isinstance(row_value[pre_col], str):
318 cn_chars = re.findall(consts.CN_RE, row_value[pre_col]) 320 cn_chars = re.findall(consts.CN_RE, row_value[pre_col])
...@@ -335,7 +337,7 @@ class BSWorkbook(Workbook): ...@@ -335,7 +337,7 @@ class BSWorkbook(Workbook):
335 max_idx = amount_cell_idx 337 max_idx = amount_cell_idx
336 else: 338 else:
337 max_idx = 0 339 max_idx = 0
338 if max_idx > 1: 340 if 1 < max_idx < len(row_value):
339 append_list = [] 341 append_list = []
340 for i in range(2, max_idx+1): 342 for i in range(2, max_idx+1):
341 if isinstance(row_value[i], str): 343 if isinstance(row_value[i], str):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!