You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an attempt to use DynamicColumns with IDataReader i converted the reader into an IEnumerable<Dictionary<string, object>> using the following method:
privateIEnumerable<Dictionary<string,object>>AsDict(IDataReaderdataReader){while(dataReader.Read()){yieldreturnEnumerable.Range(0,dataReader.FieldCount).ToDictionary(dataReader.GetName,
i =>dataReader[i]);}}
However i discovered that this approach did not work because when passing an IEnumerable to MiniExcel.SaveAs() it is iterated twice. In the second iteration the IEnumerable is empty because is data from has dataReader has already been read.
I would be nice if MiniExcel supported proper deferred execution by only traversing the IEnumerable once.
The text was updated successfully, but these errors were encountered:
In an attempt to use DynamicColumns with IDataReader i converted the reader into an IEnumerable<Dictionary<string, object>> using the following method:
However i discovered that this approach did not work because when passing an IEnumerable to MiniExcel.SaveAs() it is iterated twice. In the second iteration the IEnumerable is empty because is data from has dataReader has already been read.
I would be nice if MiniExcel supported proper deferred execution by only traversing the IEnumerable once.
The text was updated successfully, but these errors were encountered: