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

Created Unassigned: Cell ranges are not supported in the PRODUCT function [9469]

$
0
0
Hi.

If you run this code, everything will be OK.

```
var book = new XLWorkbook();

var ws = book.AddWorksheet("ws");

ws.Cell("A1").Value = 2;
ws.Cell("B1").Value = 3;
ws.Cell("C1").FormulaA1 = "PRODUCT(A1,B1,4)";

var result = ws.Cell("C1").GetDouble();

Assert.IsTrue(result == 24);
```
But if you try to use a range (A1:B1 instead of A1,B1), then only the first cell is evaluated.
```
var book = new XLWorkbook();

var ws = book.AddWorksheet("ws");

ws.Cell("A1").Value = 2;
ws.Cell("B1").Value = 3;
ws.Cell("C1").FormulaA1 = "PRODUCT(A1:B1,4)";

var result = ws.Cell("C1").GetDouble();

Assert.IsTrue(result == 24);
```

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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