public Row(uint rowIndex, List <CellScheme> schemes) { RowIndex = rowIndex; m_cells = new List <Cell>(); for (int i = 0; i < schemes.Count; ++i) { CellScheme scheme = schemes[i]; m_cells.Add(Cell.Create((uint)i, scheme)); } }
bool ReadFieldNames(IExcelDataReader reader) { if (!reader.Read()) { Console.WriteLine("Sheet \"{0}\" does not have field name row", Name); return(false); } for (int i = 0; i < reader.FieldCount; ++i) { CellScheme scheme = new CellScheme(); scheme.Name = reader.GetString(i); m_schemes.Add(scheme); } return(true); }
public static Cell Create(uint columnIndex, CellScheme scheme) { switch (scheme.Type) { case CellScheme.eType.Int: return(new CellInt(columnIndex, scheme)); case CellScheme.eType.Float: return(new CellFloat(columnIndex, scheme)); case CellScheme.eType.Bool: return(new CellBool(columnIndex, scheme)); case CellScheme.eType.String: return(new CellString(columnIndex, scheme)); case CellScheme.eType.Comment: return(new CellComment(columnIndex, scheme)); default: return(null); } }
public CellBool(uint columnIndex, CellScheme scheme) : base(columnIndex, scheme) { }
public CellFloat(uint columnIndex, CellScheme scheme) : base(columnIndex, scheme) { }
public Cell(uint columnIndex, CellScheme scheme) { ColumnIndex = columnIndex; m_scheme = scheme; }
public CellComment(uint columnIndex, CellScheme scheme) : base(columnIndex, scheme) { }
public CellString(uint columnIndex, CellScheme scheme) : base(columnIndex, scheme) { }