We are using OpenXML to create the excel file and among other things we want to write the Columns
OpenXMLElement after ending with the SheetData object, given that the Columns element has to be written before the SheetData one for the Excel to open it.
I have tried to use:
worksheetPart.Worksheet.InsertAt(new Columns(this._columnList), 1);
worksheetPart.Worksheet.Descedants<SheetData>().First()
then use the InsertBefore() method on the resulted object
There is a lot of memory consumption for large sheets and the creation never completes.
Is there a more efficient way to do that using OpenXML?