Example #1
0
 /// <summary>Returns a cell as specified by its location.</summary>
 /// <remarks>
 /// Returns a cell as specified by its location. If the cell is in a col-span
 /// or row-span and is not the top left cell, then <code>null</code> is returned.
 /// </remarks>
 /// <param name="row">the row of the cell. indexes are zero-based</param>
 /// <param name="column">the column of the cell. indexes are zero-based</param>
 /// <returns>the cell at the specified position.</returns>
 public virtual Cell GetCell(int row, int column)
 {
     if (row - rowWindowStart < rows.Count)
     {
         Cell cell = rows[row - rowWindowStart][column];
         // make sure that it is top left corner of cell, even in case colspan or rowspan
         if (cell != null && cell.GetRow() == row && cell.GetCol() == column)
         {
             return(cell);
         }
     }
     return(null);
 }
Example #2
0
 private bool CellBelongsToAnyRowGroup(Cell cell, IList <Table.RowRange> rowGroups)
 {
     return(rowGroups != null && rowGroups.Count > 0 && cell.GetRow() >= rowGroups[0].
            GetStartRow() && cell.GetRow() <= rowGroups[rowGroups.Count - 1].GetFinishRow());
 }