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

Commented Unassigned: Using IF formula with cell referenced produces invalid Excel 2010 document [9143]

$
0
0
This code will produce the file which would be impossible to open in Excel 2010 x32 (Russian) properly:

```
using (var workbook = new XLWorkbook ())
{
var worksheet = workbook.Worksheets.Add ("Report");

worksheet.Cell (1, 1).Value = 1;
worksheet.Cell (1, 2).FormulaR1C1 = "=IF(A1>0;1;0)";

workbook.SaveAs (@"c:\temp\test.xlsx");
}
```
Comments: ** Comment from web user: roberttanenbaum **

Try "IF(A1>0,1,0)"
Using commas instead of semicolons.


Viewing all articles
Browse latest Browse all 1877

Trending Articles