@@ -37,8 +37,6 @@ public class ExcelDynamicWriter : IDisposable
false => GenerateHeader(worksheet, values.First()),
};
- if (rowIndex == null) throw new NullReferenceException(nameof(rowIndex));
-
foreach (var row in values)
{
foreach (var cell in row)
@@ -54,7 +54,8 @@ public static class TypeExtensions
}
catch (OverflowException exception)
- return Nullable.GetUnderlyingType(property.PropertyType) != null ? null : throw exception;
+ if (Nullable.GetUnderlyingType(property.PropertyType) != null) return null;
+ throw;