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:
@@ -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)
|
||||||
# 检查下一行是否也是页脚信息
|
# 检查下一行是否也是页脚信息
|
||||||
|
|||||||
Reference in New Issue
Block a user