i just created a simple example. I have a small table (3cols, 2 data rows). This table will be extended to 10.000 data rows. After that a list will fill the 10.000 data rows.
The example takes 27s on my laptop. The profiler shows that 86% of total time is spent in Insert.RowsBelow
public new IXLTableRows InsertRowsBelow(int numberOfRows)
var rows = new XLTableRows(Worksheet.Style);
var inserted = base.InsertRowsBelow(numberOfRows); <-- 1%
inserted.ForEach(r => rows.Add(new XLTableRow(this, r as XLRangeRow))); <-- 85%
Filling the data is done <1s. The remaining time is used for the workbook.saveas routine.
The function doing most individual work is this one:
I'm wondering why the creation of 10.000 rows takes so long and if there could be a more efficient way to do that?