mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Filter blank sheet
--bug=1052097 --user=刘瑞斌 【github#2196】【应用编排】应用对话的时候上传带空白sheet的表格会报错 https://www.tapd.cn/57709429/s/1653414
This commit is contained in:
parent
f333658ac6
commit
89c08b4bb0
|
|
@ -68,6 +68,9 @@ class XlsSplitHandle(BaseParseTableHandle):
|
|||
sheets = workbook.sheets()
|
||||
md_tables = ''
|
||||
for sheet in sheets:
|
||||
# 过滤空白的sheet
|
||||
if sheet.nrows == 0 or sheet.ncols == 0:
|
||||
continue
|
||||
|
||||
# 获取表头和内容
|
||||
headers = sheet.row_values(0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue