Skip to content

Commit

Permalink
Merge branch 'develop' into task/RDMP-65-rembember-extraction-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Mar 25, 2024
2 parents e2ac69d + a5b0937 commit fb8d9d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageVersion Include="Microsoft.XmlSerializer.Generator" Version="8.0.0"/>
<PackageVersion Include="MongoDB.Driver" Version="2.24.0"/>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageVersion Include="NPOI" Version="2.6.2"/>
<PackageVersion Include="NPOI" Version="2.7.0"/>
<PackageVersion Include="NLog" Version="5.2.8"/>
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.3"/>
<PackageVersion Include="SixLabors.ImageSharp.Drawing" Version="2.1.2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public DataTable GetAllData(ISheet worksheet, IDataLoadEventListener listener, i
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information,
$"Excel sheet {worksheet.SheetName} contains {nColumns}"));


if (replacementHeadersSplit is not null && replacementHeadersSplit.Any() && replacementHeadersSplit.Length != nColumns)
listener.OnNotify(this,
new NotifyEventArgs(ProgressEventType.Error,
Expand Down Expand Up @@ -182,7 +182,7 @@ public DataTable GetAllData(ISheet worksheet, IDataLoadEventListener listener, i

nonBlankColumns.Add(cell.ColumnIndex, toReturn.Columns.Add(h));
}
if(replacementHeadersSplit is not null && replacementHeadersSplit.Any())
if (replacementHeadersSplit is not null && replacementHeadersSplit.Any())
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information,
$"Force headers will make the following header changes:{GenerateASCIIArtOfSubstitutions(originalHeaders, replacementHeadersSplit)}"));

Expand Down Expand Up @@ -270,13 +270,13 @@ private object GetCellValue([CanBeNull] ICell cell, CellType treatAs = CellType.
var format = cell.CellStyle.GetDataFormatString();

if (IsDateWithoutTime(format))
return cell.DateCellValue.ToString("yyyy-MM-dd");
return cell.DateCellValue.HasValue ? cell.DateCellValue.Value.ToString("yyyy-MM-dd") : null;

if (IsDateWithTime(format))
return cell.DateCellValue.ToString("yyyy-MM-dd HH:mm:ss");
return cell.DateCellValue.HasValue ? cell.DateCellValue.Value.ToString("yyyy-MM-dd HH:mm:ss") : null;

if (IsTimeWithoutDate(format))
return cell.DateCellValue.ToString("HH:mm:ss");
return cell.DateCellValue.HasValue ? cell.DateCellValue.Value.ToString("HH:mm:ss") : null;

return new NumberFormat(format).Format(
IsDateFormat(format) ? cell.DateCellValue : cell.NumericCellValue, CultureInfo.InvariantCulture);
Expand Down Expand Up @@ -418,4 +418,4 @@ public DataTable GetChunk(IDataLoadEventListener listener, GracefulCancellationT
{
return GetChunk(listener, cancellationToken, 0, 0);
}
}
}

0 comments on commit fb8d9d5

Please sign in to comment.