↧
New Post: Adding formula results save prompt when excel file is closed
↧
Commented Unassigned: IXLColumn.AdjustToContents doesn't work correctly on a HighDPI display [9371]
When using a HighDPI display, IXLColumn.AdjustToContents doesn't work as expected; it makes the columns too long, probably by the same percentage as currentDPI / 96.
The problem is probably around IXLFontBase.GetWidth().
Comments: We are writing a .NET application using ClosedXML and I can also confirm this issue. On my machine AdjustToContents worked fine; however on a coworker's machine, the function added extra space to the column. I then found this thread and decided to look at both our DPI settings in windows 7. I am set to small (100%), whereas he is set to Medium (125%). I then told him to change his DPI to Small. The problem went away. We are putting in a request to also get this issue fixed.
The problem is probably around IXLFontBase.GetWidth().
Comments: We are writing a .NET application using ClosedXML and I can also confirm this issue. On my machine AdjustToContents worked fine; however on a coworker's machine, the function added extra space to the column. I then found this thread and decided to look at both our DPI settings in windows 7. I am set to small (100%), whereas he is set to Medium (125%). I then told him to change his DPI to Small. The problem went away. We are putting in a request to also get this issue fixed.
↧
↧
Created Unassigned: Failed to create a very large file [9384]
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);__
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);__
↧
Commented Unassigned: Failed to create a very large file [9384]
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: Version of ClosedXML 0.69.1.0
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: Version of ClosedXML 0.69.1.0
↧
Commented Unassigned: Failed to create a very large file [9384]
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
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
↧
↧
New Post: Vlookup function supported by Closedxml
I think that the VLookup function is quite difficult to implement so I dont think its going to get included anytime soon
↧
New Post: Conditional Formatting question
How do I only remove conditional formatting?
Or how do I copy a worksheet range without the conditional formatting?
I want to keep everything else, i.e., values, formats, etc.
Or how do I copy a worksheet range without the conditional formatting?
I want to keep everything else, i.e., values, formats, etc.
↧
Source code checked in, #4cbcac89e85eb03c9cf31ad4162e729db69a596f
Add Remove and RemoveAll methods for conditional formats.
↧
New Post: Conditional Formatting question
It wasn't supported until now. Pick up the latest source code. You'll be able to do
worksheet.ConditionalFormats.RemoveAll(); // Remove all conditional formats on the ws
worksheet.ConditionalFormats.Remove( cf => cf.Range.Contains("A1") ); // Specify a predicate to match which conditional formats to remove.
worksheet.ConditionalFormats.RemoveAll(); // Remove all conditional formats on the ws
worksheet.ConditionalFormats.Remove( cf => cf.Range.Contains("A1") ); // Specify a predicate to match which conditional formats to remove.
↧
↧
New Post: Conditional Formatting question
Thanks. I built from source and used it. It works.
↧
Commented Unassigned: Failed to create a very large file [9384]
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: No AnyCPU?
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: No AnyCPU?
↧
Commented Unassigned: Failed to create a very large file [9384]
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: AnyCPU is fine as long as it includes x64
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: AnyCPU is fine as long as it includes x64
↧
New Post: Excel 2013 - 2010 compatibility
Hello
I reproduced.
1) Create an Excel file "Book1.xlsx" with Excel 2013 / Windows8.1.
2) Execute below with Excel 2010 / Windows 8:
4) Input any string and save.
5) Open Book1.xlsx with Excel 2010 , "unreadable content" error occured.
6) Execute 2) again, " 'x' was an undeclared namespace" error occured.
ClosedXML version is 0.75.0.
I hope this helps to fix the problem.
I reproduced.
1) Create an Excel file "Book1.xlsx" with Excel 2013 / Windows8.1.
2) Execute below with Excel 2010 / Windows 8:
XLWorkbook xl = new XLWorkbook(@"c:\AnyPath\Book1.xlsx");
xl.Save();
3) Open Book1.xlsx with Excel 2010 / Windows 8.4) Input any string and save.
5) Open Book1.xlsx with Excel 2010 , "unreadable content" error occured.
6) Execute 2) again, " 'x' was an undeclared namespace" error occured.
ClosedXML version is 0.75.0.
I hope this helps to fix the problem.
↧
↧
Commented Unassigned: Failed to create a very large file [9384]
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 have the same Issue. ClosedXML version 0.75.0.0
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 have the same Issue. ClosedXML version 0.75.0.0
↧
Created Unassigned: Saving a Xlsx with Conditional formatting [9385]
Saving a xlsx with conditional formatting that a gradient with colors picked from the Theme Color selection throws an exception "cannot convert theme color to Color".
Changing said colors to one from the personalized or more colors category stops throwing the error.
Changing said colors to one from the personalized or more colors category stops throwing the error.
↧
Commented Unassigned: Saving a Xlsx with Conditional formatting [9385]
Saving a xlsx with conditional formatting that a gradient with colors picked from the Theme Color selection throws an exception "cannot convert theme color to Color".
Changing said colors to one from the personalized or more colors category stops throwing the error.
Comments: Give me a step by step to reproduce it because it works for me.
Changing said colors to one from the personalized or more colors category stops throwing the error.
Comments: Give me a step by step to reproduce it because it works for me.
↧
New Comment on "Documentation"
Dim wb = New XLWorkbook
wb.Worksheets.Add(dataSet)
Absolutely brilliant! The best two lines of code I've ever used!
↧
↧
Commented Unassigned: Saving a Xlsx with Conditional formatting [9385]
Saving a xlsx with conditional formatting that a gradient with colors picked from the Theme Color selection throws an exception "cannot convert theme color to Color".
Changing said colors to one from the personalized or more colors category stops throwing the error.
Comments: Create a conditional formatting for color scale, pick 3 colors, set the first color to one of the colors In the template section, the other two pick them using the rgb color picker, save it, open it with closedxml and immediately save it, it should throw the error
Changing said colors to one from the personalized or more colors category stops throwing the error.
Comments: Create a conditional formatting for color scale, pick 3 colors, set the first color to one of the colors In the template section, the other two pick them using the rgb color picker, save it, open it with closedxml and immediately save it, it should throw the error
↧
Commented Unassigned: Changing a Column Header's text [9383]
I am trying to change the text of cells in the first row of the spreadsheet, essentially the column header.
This example is just changing the first cell in row 1.
```
Dim l_sValue As String
l_sValue = "test"
wb.Worksheets(0).Cell(1, 1).DataType = XLCellValues.Text
wb.Worksheets(0).Cell(1, 1).Value = l_sValue
```
However, when I do this the spreadsheet needs to be repaired when I open it. If I change any cell other than a cell in row 1 I have no issues.
I need to modify the column headers so they have a better meaning and can't do this in the DataTable that I am importing from.
Comments: I have the exact same issue! - Created worksheet from datatable using ``` XLWorkbook wb = new XLWorkbook(); var temp_ws = wb.Worksheets.Add(datatable, "SheetName"); ``` - Changed a value in first row (a header cell value) ``` temp_ws.Cell(1, 1).Value= "Label"; ``` - When I tried to save the file it saves, but when trying to open it I get the following prompt ``` We found a problem with some content in "Test.xlsx" Do you want us to try to recover as much as we can? ``` - If i clicked yes the file opens but it shows ``` Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded. Repaired Records: Table from /xl/tables/table1.xml part (Table) ``` - If i changed value in any other cell (other then first row) it changes fine and error messages does not appear. - If I didnt change any value (just let the excel use the default labels of the datatable) It saves and opens fine, but as OP stated, I need to change label values at excel level not datatable level (it should not be a problem since other values can be changed fine, why only the first row have problems?) Any fix / workaround is appreciated
This example is just changing the first cell in row 1.
```
Dim l_sValue As String
l_sValue = "test"
wb.Worksheets(0).Cell(1, 1).DataType = XLCellValues.Text
wb.Worksheets(0).Cell(1, 1).Value = l_sValue
```
However, when I do this the spreadsheet needs to be repaired when I open it. If I change any cell other than a cell in row 1 I have no issues.
I need to modify the column headers so they have a better meaning and can't do this in the DataTable that I am importing from.
Comments: I have the exact same issue! - Created worksheet from datatable using ``` XLWorkbook wb = new XLWorkbook(); var temp_ws = wb.Worksheets.Add(datatable, "SheetName"); ``` - Changed a value in first row (a header cell value) ``` temp_ws.Cell(1, 1).Value= "Label"; ``` - When I tried to save the file it saves, but when trying to open it I get the following prompt ``` We found a problem with some content in "Test.xlsx" Do you want us to try to recover as much as we can? ``` - If i clicked yes the file opens but it shows ``` Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded. Repaired Records: Table from /xl/tables/table1.xml part (Table) ``` - If i changed value in any other cell (other then first row) it changes fine and error messages does not appear. - If I didnt change any value (just let the excel use the default labels of the datatable) It saves and opens fine, but as OP stated, I need to change label values at excel level not datatable level (it should not be a problem since other values can be changed fine, why only the first row have problems?) Any fix / workaround is appreciated
↧
Commented Unassigned: Changing a Column Header's text [9383]
I am trying to change the text of cells in the first row of the spreadsheet, essentially the column header.
This example is just changing the first cell in row 1.
```
Dim l_sValue As String
l_sValue = "test"
wb.Worksheets(0).Cell(1, 1).DataType = XLCellValues.Text
wb.Worksheets(0).Cell(1, 1).Value = l_sValue
```
However, when I do this the spreadsheet needs to be repaired when I open it. If I change any cell other than a cell in row 1 I have no issues.
I need to modify the column headers so they have a better meaning and can't do this in the DataTable that I am importing from.
Comments: Also I should Mention that I tried the following (Clearing the value first, and setting the datatype to String before setting the value) but still did not work ``` temp_ws.Cell(1, 1).Clear(); temp_ws.Cell(1, 1).DataType = XLCellValues.Text; temp_ws.Cell(1, 1).Value= "Label"; ```
This example is just changing the first cell in row 1.
```
Dim l_sValue As String
l_sValue = "test"
wb.Worksheets(0).Cell(1, 1).DataType = XLCellValues.Text
wb.Worksheets(0).Cell(1, 1).Value = l_sValue
```
However, when I do this the spreadsheet needs to be repaired when I open it. If I change any cell other than a cell in row 1 I have no issues.
I need to modify the column headers so they have a better meaning and can't do this in the DataTable that I am importing from.
Comments: Also I should Mention that I tried the following (Clearing the value first, and setting the datatype to String before setting the value) but still did not work ``` temp_ws.Cell(1, 1).Clear(); temp_ws.Cell(1, 1).DataType = XLCellValues.Text; temp_ws.Cell(1, 1).Value= "Label"; ```
↧