diff --git a/src/MiniExcel/MiniExcel.cs b/src/MiniExcel/MiniExcel.cs index 44686038..62ab3013 100644 --- a/src/MiniExcel/MiniExcel.cs +++ b/src/MiniExcel/MiniExcel.cs @@ -31,7 +31,7 @@ public static void Insert(string path, object value, string sheetName = "Sheet1" if (!File.Exists(path)) { - SaveAs(path, value, printHeader, sheetName, excelType); + SaveAs(path, value, printHeader, sheetName, excelType, configuration); } else { @@ -56,7 +56,7 @@ public static void Insert(this Stream stream, object value, string sheetName = " { object v = null; { - if (!(value is IEnumerable) && !(value is IDataReader) && !(value is IDictionary) && !(value is IDictionary)) + if (!(value is IEnumerable) && !(value is IDataReader)) v = Enumerable.Range(0, 1).Select(s => value); else v = value;