예제 #1
0
        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);
        }
예제 #2
0
        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;
        }
예제 #3
0
 public XLTableRow(XLTableRange tableRange, XLRangeRow rangeRow)
     : base(rangeRow.RangeParameters, false)
 {
     _tableRange = tableRange;
 }
예제 #4
0
 public XLTableRow(XLTableRange tableRange, XLRangeRow rangeRow)
     : base(new XLRangeParameters(rangeRow.RangeAddress, rangeRow.Style))
 {
     _tableRange = tableRange;
 }
예제 #5
0
 public XLTableRow(XLTableRange tableRange, XLRangeRow rangeRow)
     : base(rangeRow.RangeParameters, false)
 {
     _tableRange = tableRange;
 }