This commit is contained in:
2026-01-08 14:34:47 +08:00
parent db0e2bca6c
commit 05cd7ab2b1

View File

@@ -155,15 +155,11 @@ namespace DOAN.Service.BZFM
{
IWorkbook workbook = new XSSFWorkbook(stream);
ISheet sheet = workbook.GetSheetAt(0);
// 处理第2行 获取日期
IRow secondRow = sheet.GetRow(1);
NPOI.SS.UserModel.ICell cell = secondRow.GetCell(0);
#region excel
// 遍历每一行
for (int row = 4; row <= sheet.LastRowNum; row++)
for (int row = 2; row <= sheet.LastRowNum; row++)
{
IRow currentRow = sheet.GetRow(row);
if (currentRow != null) // 确保行不为空