internal void AddCell(int row, int column, SpreadsheetCellModel cell) { var cellKey = new CellKey { Row = row, Column = column }; if (cells.ContainsKey(cellKey)) { cells[cellKey] = cell; } else { cells.Add(cellKey, cell); } }
public SpreadsheetModel(Table table) { numberFormats = new NumberFormatsCollection(table.NumberFormats); startRow = table.startRow; endRow = table.endRow; startCol = table.startCol; endCol = table.endCol; if (table.Cell != null) { foreach (var xmlCell in table.Cell) { var row = xmlCell.row; var column = xmlCell.col; var cellValue = xmlCell.Value; var cell = new SpreadsheetCellModel(row, column, xmlCell.contentType.ToModelCellType(), xmlCell.formatId, numberFormats, xmlCell.rawValue, cellValue); AddCell(row, column, cell); } } }