fix: Filter blank sheet

--bug=1052097 --user=刘瑞斌 【github#2196】【应用编排】应用对话的时候上传带空白sheet的表格会报错 https://www.tapd.cn/57709429/s/1653414
This commit is contained in:
CaptainB 2025-02-11 15:15:04 +08:00 committed by 刘瑞斌
parent f333658ac6
commit 89c08b4bb0

View File

@ -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)