a017b458 by 周伟奇

add filter

1 parent 4b008519
......@@ -7,7 +7,7 @@ from pandas._libs import tslib
from pandas._libs.tslibs.nattype import NaTType
from pandas.core.indexes.datetimes import DatetimeIndex
from openpyxl import Workbook
from openpyxl.styles import Border, Side, PatternFill, numbers
from openpyxl.styles import PatternFill, numbers
from openpyxl.utils import get_column_letter
from apps.doc import consts
......@@ -452,6 +452,9 @@ class BSWorkbook(Workbook):
amount_fill_row = set()
loan_fill_row = set()
# 添加筛选
new_ws.auto_filter.ref = 'A1:{0}{1}'.format(get_column_letter(new_ws.max_column), new_ws.max_row)
for rows in new_ws.iter_rows(min_row=2):
length = len(rows)
summary_cell = None if summary_cell_idx is None or summary_cell_idx >= length else rows[summary_cell_idx]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!