diff --git a/ClosedXML/ClosedXML/ClosedXML.sln b/ClosedXML/ClosedXML/ClosedXML.sln index 2ec88b1..67b4c91 100644 --- a/ClosedXML/ClosedXML/ClosedXML.sln +++ b/ClosedXML/ClosedXML/ClosedXML.sln @@ -135,9 +135,6 @@ GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = ClosedXML.vsmdi EndGlobalSection diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs index 281e85a..2dc1563 100644 --- a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs +++ b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs @@ -319,9 +319,22 @@ public string GetFormattedString() { - if (FormulaA1.Length > 0) return String.Empty; - - var cValue = _cellValue; + String cValue; + if (FormulaA1.Length > 0) + { + try + { + cValue = GetString(); + } + catch + { + cValue = String.Empty; + } + } + else + { + cValue = _cellValue; + } if (_dataType == XLCellValues.Boolean) return (cValue != "0").ToString();