Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: Failed to create a very large file [9384]

$
0
0
Failed to create a very large file

When I have more than 100000 rows gives me the following error

__Row = 183 706__ - System.OutOfMemoryException: An unhandled exception of type 'System.OutOfMemoryException'. in DocumentFormat.OpenXml.OpenXmlChildElements.GetEnumerator () in 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.OpenXmlElement.WriteTo (XmlWriter xmlWriter) at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo (XmlWriter w) at DocumentFormat.OpenXml.OpenXmlPartRootElement .WriteTo (XmlWriter xmlWriter) in DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart (OpenXmlPart openXmlPart) in DocumentFormat.OpenXml.OpenXmlPartRootElement.Save () in DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContent (OpenXmlPart part) in DocumentFormat.OpenXml.Packaging.OpenXmlPackage .TrySavePartContent (OpenXmlPart part) in DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents () in DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose (Boolean disposing) in DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose () in ClosedXML.Excel.XLWorkbook .CreatePackage (String filePath) at ClosedXML.Excel.XLWorkbook.SaveAs (String file) in WebApplication.Reporte12.Obsolecencia.GenerarExcel (Int64 IdSociedad) in ....

according to the program when I add a new sheet the range is __[ClosedXML.Excel.XLWorksheet] = {'Sheet1'! A1: XFD1048576} __

the error is when __wb.SaveAs(file);__
Comments: Compile to x64

Viewing all articles
Browse latest Browse all 1877

Trending Articles