I use this code to load data into a worksheet (C#, EPPlus 4.04) and set the column width automatically:
workSheet.Cells["A1"].LoadFromCollection(itemsToExport, PrintHeaders: true);
workSheet.Cells[workSheet.Dimension.Address].AutoFitColumns();
There is a significant performance penalty that seems to be lineair with the number of records in the worksheet. E.g. a 2 second difference on 15K records, and I have to create multiple files.
Is there a way to speed this up without resorting to async processing and the likes?
Ps, setting AutoFitColumns before filling the data does not work, columns will remain in a width that's too small for the data.