fix: 导出时的bug
This commit is contained in:
parent
6f7a732618
commit
0772be47de
|
@ -142,9 +142,12 @@ def export_excel_img(field_data: list, data: list, FileName: str):
|
|||
cell = ws.cell(column=i2+1, row=i1+2)
|
||||
if v2 and field_data[i2]['type'] == 'img':
|
||||
ws.row_dimensions[i1+2].height = 70
|
||||
img = Image(settings.BASE_DIR + v2)
|
||||
img.width, img.height = (90, 90)
|
||||
imgs.append((img, field_data[i2]['letter'] + str(i1+2)))
|
||||
try:
|
||||
img = Image(settings.BASE_DIR + v2)
|
||||
img.width, img.height = (90, 90)
|
||||
imgs.append((img, field_data[i2]['letter'] + str(i1+2)))
|
||||
except: # 这里先不做处理
|
||||
pass
|
||||
else:
|
||||
cell.value = v2
|
||||
|
||||
|
|
Loading…
Reference in New Issue