OpenXml.Excel.Data.ExcelDataReader.GetCellValue C# (CSharp) Method

GetCellValue() private method

private GetCellValue ( CellType cell ) : string
cell CellType
return string
        private string GetCellValue(CellType cell)
        {
            if (cell == null || cell.CellValue == null)
                return null;

            var value = cell.CellValue.InnerXml;
            if (value == null)
                return null;

            int index;            
            if (int.TryParse(value, out index) && cell.DataType != null && cell.DataType.Value == CellValues.SharedString)
                return _sharedStrings[index];

            return value;
        }