Exemple #1
0
 public void SetCellTypeRow(int rowIndex, ExcelTableCellType type)
 {
     for (int column = 1; column <= NumberOfColumns; column++)
     {
         ExcelTableCell cell = GetCell(rowIndex, column);
         if (cell != null)
         {
             cell.Type = type;
         }
     }
 }
Exemple #2
0
        public object GetValue(int row, int column)
        {
            ExcelTableCell cell = GetCell(row, column);

            if (cell != null)
            {
                return(cell.Value);
            }
            else
            {
                return(SetValue(row, column, "").Value);
            }
        }
Exemple #3
0
 public void SetCellTypeColumn(int columnIndex, ExcelTableCellType type, List <string> values = null)
 {
     for (int row = 1; row <= NumberOfRows; row++)
     {
         ExcelTableCell cell = GetCell(row, columnIndex);
         if (cell != null)
         {
             cell.Type = type;
             if (values != null)
             {
                 cell.ValueSelected = values;
             }
         }
     }
 }
Exemple #4
0
        public ExcelTableCell SetValue(int row, int column, string value)
        {
            CorrectSize(row, column);
            if (!cells.ContainsKey(row))
            {
                cells[row] = new Dictionary <int, ExcelTableCell>();
            }

            if (cells[row].ContainsKey(column))
            {
                cells[row][column].Value = value;

                return(cells[row][column]);
            }
            else
            {
                ExcelTableCell cell = new ExcelTableCell(row, column, value);
                cells[row][column] = cell;
                return(cell);
            }
        }