Upgrade NPOI and automate validation

This commit is contained in:
Andy Howard
2026-09-12 17:00:28 +01:00
parent c510adc95c
commit 8cbef7f847
7 changed files with 129 additions and 5 deletions
@@ -850,7 +850,7 @@ namespace Sarand.Net.Standard.Proc.Excel
{
// Ref. https://stackoverflow.com/questions/23280533/apache-poi-getting-a-null-pointer-while-reading-a-cell-with-value
// recommends using DateTime.FromOADate(cell.NumericCellValue) rather than cell.DateCellValue
return new DataValue(cell.DateCellValue);
return new DataValue(DateTime.FromOADate(cell.NumericCellValue));
}
if (IsCellNumeric(cell))
{
@@ -1477,7 +1477,7 @@ namespace Sarand.Net.Standard.Proc.Excel
byte red = (byte)((rgbColour >> 0) & 0xff);
byte green = (byte)((rgbColour >> 8) & 0xff);
byte blue = (byte)((rgbColour >> 16) & 0xff);
IIndexedColorMap colorMap = stylesTable.GetIndexedColors();
IIndexedColorMap colorMap = stylesTable.IndexedColors;
for (int styleIdx = 0; styleIdx < stylesTable.NumCellStyles; styleIdx++)
{
ICellStyle style = stylesTable.GetStyleAt(styleIdx);
+2 -1
View File
@@ -11,7 +11,8 @@
<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
<PackageReference Include="NPOI" Version="2.6.2" />
<PackageReference Include="NPOI" Version="2.7.6" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.12" />
</ItemGroup>
<ItemGroup>