Turning off events

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);

Last edited Jan 12, 2012 at 3:21 AM by MDeLeon, version 1