Exemplo n.º 1
0
        public void ReadRowValues(SheetReader sheetReader)
        {
            do
            {
                if (sheetReader.Address == null)
                {
                    continue;
                }

                var cellRef = new CellRef(sheetReader.Address);
                RowValuesByColumRef.Add(cellRef.Column, sheetReader.Value);
                var colNumber = cellRef.ColumnNumber - 1;
                if (!_cellSettersDictionaryForRead.ContainsKey(colNumber))
                {
                    continue;
                }

                var cellValue = sheetReader.Value;
                if (cellValue != null)
                {
                    RowIsPopulated = true;
                    if (RowValues == null)
                    {
                        RowValues = new Dictionary <int, object>();
                    }

                    RowValues.Add(colNumber, cellValue);
                }
            } while (sheetReader.ReadNextInRow());
        }
Exemplo n.º 2
0
        public void Clear()
        {
            RowValuesByColumRef.Clear();
            if (RowValues != null)
            {
                RowValues.Clear();
                RowIsPopulated = false;
            }

            _currentObject = null;
        }