bugfix
This commit is contained in:
parent
7ba23aef5f
commit
efeabe68a9
@ -45,12 +45,13 @@ def write_pattern_xlsx(name: str, fields: dict) -> str:
|
|||||||
def create_options(ws, dcol, sheet, opt_id, options):
|
def create_options(ws, dcol, sheet, opt_id, options):
|
||||||
r = 2
|
r = 2
|
||||||
vc = opt_id + 1
|
vc = opt_id + 1
|
||||||
|
cnt = len(options) + 1
|
||||||
for v in options:
|
for v in options:
|
||||||
sheet.cell(row=r, column=vc, value=v)
|
sheet.cell(row=r, column=vc, value=v)
|
||||||
r = r + 1
|
r = r + 1
|
||||||
colname = reverse_colnames[vc]
|
colname = reverse_colnames[vc]
|
||||||
dv = DataValidation(type="list",
|
dv = DataValidation(type="list",
|
||||||
formula1=f'dict!${colname}$1:${colname}$4',
|
formula1=f'dict!${colname}$1:${colname}${cnt}',
|
||||||
allow_blank=True)
|
allow_blank=True)
|
||||||
dv.error = '请选择下拉菜单中的有效职位。'
|
dv.error = '请选择下拉菜单中的有效职位。'
|
||||||
dv.errorTitle = '输入无效'
|
dv.errorTitle = '输入无效'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user