From 0a226fda91701f4c4e9b40d91de0eb6f8f3b9297 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 6 Aug 2024 09:21:50 +0800 Subject: [PATCH] 1 --- Tiobon.Core.Common/Helper/NPOIHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tiobon.Core.Common/Helper/NPOIHelper.cs b/Tiobon.Core.Common/Helper/NPOIHelper.cs index 4301bb1f..73987eb1 100644 --- a/Tiobon.Core.Common/Helper/NPOIHelper.cs +++ b/Tiobon.Core.Common/Helper/NPOIHelper.cs @@ -285,12 +285,17 @@ public class NPOIHelper for (int i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++) { IRow row = sheet.GetRow(i); + + if(row is null) + continue; //if (row.GetCell(row.FirstCellNum) != null && row.GetCell(row.FirstCellNum).ToString().Length > 0) //if (row.GetCell(row.FirstCellNum) != null) { DataRow dataRow = dt.NewRow(); for (int j = row.FirstCellNum; j < cellCount; j++) { + if(j<0) + continue; if (row.GetCell(j) != null) { DateTime dateV = DateTime.MinValue;