EPPlus
EPPlus copied to clipboard
Why can parallel modification of row height and column width be done on Windows, but not on Linux
EPPlus usage
Personal use
Environment
linux
Epplus version
7.2.2
Spreadsheet application
excel
Description
I am a student engaged in a restaurant management system teaching project. I have learned that EPPlus is excellent .NET project, so I am currently trying EPPlus 7.2.2. However, it is not suitable for cross platform operation. Windows can run normally and perform well, while Linux throws exceptions. I found the exception code because I parallelly modified the row height, column width, and image size in asynchronous concurrency. Therefore, I tried to read some source code and found that in the ExcelDrawings class, d_drawingsList=new List<ExcelDrawing(); This is not a concurrent collection, but why can Windows do it?
The exception :
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNext()
at OfficeOpenXml.Drawing.ExcelDrawings.GetDrawingHeight()
at OfficeOpenXml.ExcelRow.set_Height(Double value)