Ejemplo n.º 1
0
        public void SetRange(int firstCol, int lastCol, SheetColumn column)
        {
            if (lastCol < firstCol)
                throw new InvalidOperationException("Invalid range.");

            var node = GetNode(firstCol);
            node.Value.Data = column;
            node.Value.LastColumn = lastCol;

            var next = node.Next;
            while (next != null && next.Value.FirstColumn <= lastCol)
            {
                var at = next;
                next = at.Next;

                if (at.Value.LastColumn <= lastCol)
                    data.Remove(at);
                else
                    at.Value.FirstColumn = lastCol + 1;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Used in loading data
 /// </summary>
 /// <param name="firstCol"></param>
 /// <param name="lastCol"></param>
 /// <param name="sheetColumn"></param>
 internal void AppendRange(int firstCol, int lastCol, SheetColumn sheetColumn)
 {
     data.AddLast(new SheetColumnRange {
         FirstColumn = firstCol, LastColumn = lastCol, Data = sheetColumn
     });
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Used in loading data
 /// </summary>
 /// <param name="firstCol"></param>
 /// <param name="lastCol"></param>
 /// <param name="sheetColumn"></param>
 internal void AppendRange(int firstCol, int lastCol, SheetColumn sheetColumn)
 {
     data.AddLast(new SheetColumnRange { FirstColumn = firstCol, LastColumn = lastCol, Data = sheetColumn });
 }