fix: adjust footer detection logic in excel converter

Changed footer detection to look ahead at the next row instead of the current row, and simplified to only check for '制单人'.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-05 08:39:18 +08:00
parent c176063bfa
commit a78afe383f

View File

@@ -159,7 +159,7 @@ class ExcelConverter:
data_row = table_row + 1 data_row = table_row + 1
while data_row < len(all_rows) and all_rows[data_row]: while data_row < len(all_rows) and all_rows[data_row]:
# 检查是否是页脚信息(制单人、打印人) # 检查是否是页脚信息(制单人、打印人)
if all_rows[data_row][0] and ('制单人' in str(all_rows[data_row][0]) or '打印人' in str(all_rows[data_row][0])): if all_rows[data_row+1][0] and '制单人' in str(all_rows[data_row+1][0]) :
# 解析页脚信息 # 解析页脚信息
self._parse_header_row(all_rows[data_row], footer_info) self._parse_header_row(all_rows[data_row], footer_info)
# 检查下一行是否也是页脚信息 # 检查下一行是否也是页脚信息