internal static IXLTableRows InsertRowsWithoutEvents(Func <int, bool, IXLRangeRows> insertFunc, XLTableRange tableRange, Int32 numberOfRows, Boolean expandTable) { var ws = tableRange.Worksheet; var tracking = ws.EventTrackingEnabled; ws.EventTrackingEnabled = false; var rows = new XLTableRows(ws.Style); var inserted = insertFunc(numberOfRows, false); inserted.ForEach(r => rows.Add(new XLTableRow(tableRange, r as XLRangeRow))); if (expandTable) { tableRange.Table.ExpandTableRows(numberOfRows); } ws.EventTrackingEnabled = tracking; return(rows); }
internal static IXLTableRows InsertRowsWithoutEvents(Func<int, bool, IXLRangeRows> insertFunc, XLTableRange tableRange, Int32 numberOfRows, Boolean expandTable) { var ws = tableRange.Worksheet; var tracking = ws.EventTrackingEnabled; ws.EventTrackingEnabled = false; var rows = new XLTableRows(ws.Style); var inserted = insertFunc(numberOfRows, false); inserted.ForEach(r => rows.Add(new XLTableRow(tableRange, r as XLRangeRow))); if (expandTable) tableRange.Table.ExpandTableRows(numberOfRows); ws.EventTrackingEnabled = tracking; return rows; }
public XLTableRow(XLTableRange tableRange, XLRangeRow rangeRow) : base(rangeRow.RangeParameters, false) { _tableRange = tableRange; }
public XLTableRow(XLTableRange tableRange, XLRangeRow rangeRow) : base(new XLRangeParameters(rangeRow.RangeAddress, rangeRow.Style)) { _tableRange = tableRange; }