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: I tried changing to a new application on visual studio 2012 but when under the x64 platform, the application does not compile. ASP.NET Framework 4 Description: An unhandled exception while executing the current web request. Check the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: Could not load file or assembly 'pruebaBosch' or one of its dependencies. An attempt was made to load a program with an incorrect format. x64 always gives System.BadImageFormatException:
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: I tried changing to a new application on visual studio 2012 but when under the x64 platform, the application does not compile. ASP.NET Framework 4 Description: An unhandled exception while executing the current web request. Check the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: Could not load file or assembly 'pruebaBosch' or one of its dependencies. An attempt was made to load a program with an incorrect format. x64 always gives System.BadImageFormatException: