e975baa4 by 周伟奇

fix wb rebuild bug

1 parent 13e30ac5
......@@ -54,7 +54,7 @@ class BSWorkbook(Workbook):
# TODO 关键字段再次查找
if header_idx is None:
continue
letter = get_column_letter(header_idx)
letter = get_column_letter(col)
ws.move_range("{0}1:{0}{1}".format(letter, ws.max_row), cols=header_idx - col)
ws.delete_cols(self.fixed_col_amount + 1, amount=ws.max_column)
......@@ -147,8 +147,9 @@ class BSWorkbook(Workbook):
def build_month_sheet(self, role, month_mapping, ms):
tmp_ws = self.create_sheet('tmp_ws')
for month, parts in month_mapping.items():
for month in sorted(month_mapping.keys()):
# 3.1.拷贝数据
parts = month_mapping.get(month)
new_ws = self.create_sheet('{0}({1})'.format(month, role))
new_ws.append(self.fixed_headers)
for part in parts:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!