Skip to content

Commit e445110

Browse files
Merge pull request #736 from michelebastione/master
Fixed issue #735 Added missing configuration parameter in a call to MiniExcel.SaveAs in method MiniExcel.Insert, which caused the configuration not to be used when creating a new file and inserting rows from an IDataReader.
2 parents 16d8e48 + c97070c commit e445110

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MiniExcel/MiniExcel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static void Insert(string path, object value, string sheetName = "Sheet1"
3131

3232
if (!File.Exists(path))
3333
{
34-
SaveAs(path, value, printHeader, sheetName, excelType);
34+
SaveAs(path, value, printHeader, sheetName, excelType, configuration);
3535
}
3636
else
3737
{
@@ -56,7 +56,7 @@ public static void Insert(this Stream stream, object value, string sheetName = "
5656
{
5757
object v = null;
5858
{
59-
if (!(value is IEnumerable) && !(value is IDataReader) && !(value is IDictionary<string, object>) && !(value is IDictionary))
59+
if (!(value is IEnumerable) && !(value is IDataReader))
6060
v = Enumerable.Range(0, 1).Select(s => value);
6161
else
6262
v = value;

0 commit comments

Comments
 (0)