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

Closed Unassigned: Problem inserting Conditional Formulas [9332]

$
0
0
Hi,

I finding issues in inserting conditional formulas in closed xml.

For Example:
If I want to insert following formula into excel sheet
=IF(A1 > 0, Yes, No)

It appears as =IF(A1 > 0 ; Yes ; No) which is not supported in Microsoft Excel. It says formula is corrupt.

Can anyone help me??
Comments: Yes and No are invalid keywords. Put them in quotes. You did point me to a bug in the code so pick the latest source code. var wb = new XLWorkbook(); var ws = wb.AddWorksheet("Sheet"); ws.FirstCell().SetValue(1) .CellBelow().SetFormulaA1("IF(A1>0,Yes,No)") // Invalid .CellBelow().SetFormulaA1("IF(A1>0,\"Yes\",\"No\")") // OK .CellBelow().SetFormulaA1("IF(A1>0,TRUE,FALSE)"); // OK

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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