SQLtoExcel
SQLtoExcel copied to clipboard
Can't export for a huge table (1 million records)
Executing for a huge table (1 million records) will got the following error:
a1.sql
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DocumentFormat.OpenXml.EnumInfoLookup1.EnumStringLookupImpl.IsDefined(TEnum value, Int32& index) at DocumentFormat.OpenXml.EnumInfoLookup1.EnumStringLookupImpl.Lookup(TEnum value)
at DocumentFormat.OpenXml.EnumValue1.GetText(T input) at DocumentFormat.OpenXml.OpenXmlSimpleValue1.get_InnerText()
at DocumentFormat.OpenXml.OpenXmlElement.WriteAttributesTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)
at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)
at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.Save(Stream stream)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.Save()
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.TrySavePartContent(OpenXmlPart part)
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents(Boolean save, Package package)
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing)
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose()
at SQLtoExcel.Utils.ExportDataSetToExcel(DataSet ds)