Commit 611449a2 by zhouhaibao

fix(excel): 修复清除旧数据行样式逻辑错误

- 修正了循环条件判断,将i==dataStartRow改为i==lastRowNumBefore
- 确保正确的行号用于清除旧数据行样式操作
1 parent d0011d37
...@@ -1578,7 +1578,7 @@ public class StoreExcelImportService { ...@@ -1578,7 +1578,7 @@ public class StoreExcelImportService {
for (int i = lastRowNumBefore; i >= dataStartRow; i--) { for (int i = lastRowNumBefore; i >= dataStartRow; i--) {
Row rowToRemove = sheet.getRow(i); Row rowToRemove = sheet.getRow(i);
log.info("[步骤3/5] 清除旧数据行:第{}行", i); log.info("[步骤3/5] 清除旧数据行:第{}行", i);
if(i==dataStartRow){ if(i==lastRowNumBefore){
log.info("[步骤3/5] 清除旧数据行样式:第{}行", i); log.info("[步骤3/5] 清除旧数据行样式:第{}行", i);
// 1. 清除该行所有单元格的样式 // 1. 清除该行所有单元格的样式
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!