示例#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;
            }
        }
示例#2
0
文件: SheetColumn.cs 项目: spofa/xlio
 /// <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
     });
 }
示例#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 });
 }