diff --git a/ClosedXML/Excel/CalcEngine/Functions/MathTrig.cs b/ClosedXML/Excel/CalcEngine/Functions/MathTrig.cs index c528079..075e4d3 100644 --- a/ClosedXML/Excel/CalcEngine/Functions/MathTrig.cs +++ b/ClosedXML/Excel/CalcEngine/Functions/MathTrig.cs @@ -746,7 +746,8 @@ private static object Sec(List p) { - if (double.TryParse(p[0], out double number)) + double number; + if (double.TryParse(p[0], out number)) return 1.0 / Math.Cos(number); else throw new CellValueException();