Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 490 Bytes

Turning-off-events.md

File metadata and controls

14 lines (11 loc) · 490 Bytes

By default ClosedXML keeps track of the inserts/deletes and adjusts the ranges accordingly.

For example:

var testRow = worksheet.Row(1);
worksheet.Row(1).InsertRowsAbove(1);
// testRow now points to the second row of the worksheet, not the first.

If you don't need this feature then you can turn it off to save memory and increase performance. Just open your workbook with the option XLEventTracking.Disabled.

var wb = new XLWorkbook(XLEventTracking.Disabled);