Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Created Unassigned: System.InvalidOperationException: Sequence contains no elements [9022]

$
0
0
Getting the following exception when reading/evaluation a cell value that contains "=MAX(V7, W7) * 8%" formula:

An Exception occurred: System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Max(IEnumerable`1 source)
at ClosedXML.Excel.CalcEngine.Tally.Max()
at ClosedXML.Excel.CalcEngine.Statistical.Max(List`1 p)
at ClosedXML.Excel.CalcEngine.FunctionExpression.Evaluate()
at ClosedXML.Excel.CalcEngine.Expression.op_Implicit(Expression x)
at ClosedXML.Excel.CalcEngine.BinaryExpression.Evaluate()
at ClosedXML.Excel.CalcEngine.Expression.op_Implicit(Expression x)
at ClosedXML.Excel.CalcEngine.BinaryExpression.Evaluate()
at ClosedXML.Excel.CalcEngine.CalcEngine.Evaluate(String expression)
at ClosedXML.Excel.XLWorksheet.Evaluate(String expression)
at ClosedXML.Excel.XLCell.get_Value()

Both V7 and W7 cell values are blank, but excel handles this scenario by evaluating MAX to 0.0.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>