I’m trying to write an formula using WriteExcel
=SUMIF(J3:J54;"=xxx";H3:H54)
but that code:
$sheet->write_formula($row+1, 0, "=SUMIF(J" . ($row-($row-3)) . ":J" . ($row-2) . ";\"=xxx\";H" . ($row-($row-3)) . ":H" . ($row-2) . ")");
ends with
Unknown defined name SUMIF in formula at test.pl line 196
But when I print out that formula (using print) I got exactly the same string as wanted one (calculations on $row are good)
I’m pretty sure this code should work
You need to us the US style union operator “,” instead of the European style “;”:
If you modifiy your formula string to replace ; with , it will work. I tested it.