Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: It's very slow when insert new row with bigger rownumber

$
0
0
I try to add some rows in the excel,and is used like below:

worksheet.Rows(1).InsertRowsBelow(1000); - OK
worksheet.Rows(1).InsertRowsBelow(10000); - Slow
worksheet.Rows(1).InsertRowsBelow(100000); -Very Slow

And I hope the developer can try solved it,and now i ues the thread pool to make it faster,

like

ThreadPool.QueueUserWorkItem(new WaitCallback((x) =>
        {
            if (_ranges != null)
                _ranges.ForEach(r => r.Dispose());

}));

PS:

If you can add some rows at once time . like

worksheet.FirstRow().InsertRowsBelow(10,5);

And it can be added 5 rows at once. It can be better.
Tanks

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>