|
|
@@ -205,7 +205,7 @@ class ExcelProcessor:
|
|
|
# 将新列的表头行设置为空
|
|
|
df.iloc[:self.header_row, insert_index] = ''
|
|
|
# 在表头行设置新列名
|
|
|
- df.iloc[self.header_row, insert_index] = new_column_name
|
|
|
+ df.iloc[self.header_row - 1, insert_index] = new_column_name
|
|
|
|
|
|
logger.info(f"成功在列 '{ref_column}' 的 '{position}' 插入新列 '{new_column_name}'")
|
|
|
return df
|