From 058064c70a94667b58850dcb6efa835b8c4267ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:23:26 +0000 Subject: [PATCH 1/2] Bump NPOI from 2.7.5 to 2.7.6 --- updated-dependencies: - dependency-name: NPOI dependency-version: 2.7.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8abd48b0c..0d065bf89 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,7 +15,7 @@ - + From 0472b89913094fab6595756f162bfbf57e7c7654 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Fri, 6 Mar 2026 14:33:01 -0600 Subject: [PATCH 2/2] fix: adapt to NPOI 2.7.6 API changes - Replace CellType.Unknown sentinel with nullable CellType? parameter - Replace obsolete GetRowEnumerator() with GetEnumerator() - Remove unnecessary IRow cast (GetEnumerator returns IEnumerator) --- .../DataFlowSources/ExcelDataFlowSource.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Rdmp.Core/DataLoad/Modules/DataFlowSources/ExcelDataFlowSource.cs b/Rdmp.Core/DataLoad/Modules/DataFlowSources/ExcelDataFlowSource.cs index bb30fa2bc..94c009ef7 100644 --- a/Rdmp.Core/DataLoad/Modules/DataFlowSources/ExcelDataFlowSource.cs +++ b/Rdmp.Core/DataLoad/Modules/DataFlowSources/ExcelDataFlowSource.cs @@ -130,14 +130,14 @@ public DataTable GetAllData(ISheet worksheet, IDataLoadEventListener listener, i var toReturn = new DataTable(); toReturn.BeginLoadData(); - var rowEnumerator = worksheet.GetRowEnumerator(); + var rowEnumerator = worksheet.GetEnumerator(); var nColumns = -1; var nonBlankColumns = new Dictionary(); while (rowEnumerator.MoveNext()) { - var row = (IRow)rowEnumerator.Current; + var row = rowEnumerator.Current; if (rowOffset - 1 > row.RowNum) continue;// .RowNumber is 0 indexed //if all the cells in the current row are blank skip it (eliminates top of file whitespace) @@ -246,21 +246,16 @@ private static string GenerateASCIIArtOfSubstitutions(string[] headers, /// The cell whose value you want to retrieve /// Leave blank, used in recursion for dealing with Formula cells /// - private object GetCellValue([CanBeNull] ICell cell, CellType treatAs = CellType.Unknown) + private object GetCellValue([CanBeNull] ICell cell, CellType? treatAs = null) { if (cell == null) return null; - treatAs = treatAs switch - { - CellType.Formula => throw new Exception("Cannot treat the cell contents as a Formula"), - CellType.Unknown => cell.CellType, - _ => treatAs - }; + treatAs ??= cell.CellType; switch (treatAs) { - case CellType.Unknown: + default: return cell.ToString(); case CellType.Numeric: @@ -297,8 +292,6 @@ private object GetCellValue([CanBeNull] ICell cell, CellType treatAs = CellType. return cell.BooleanCellValue; case CellType.Error: return null; - default: - throw new ArgumentOutOfRangeException(nameof(treatAs)); } }