The code below generates cells with "=#N/A". Any idea why? The same formulas work in a manually created excel file. Are the formulas too advanced or something for PHPExcel? Thanks!
$objWorksheet->setCellValue("A$excelRow", '=IFERROR(IF((INDIRECT("A"&ROW()-1))="Seq. #",1,IF(ISTEXT([@Column2]),COUNTA(INDIRECT("B20"):[@Column2]),"")),"")'); // Seq. #
$objWorksheet->setCellValue("J$excelRow", '=IFERROR(IF(OR([@Column6]="",[@Column9]=""),"",(INT(((([@Column7]-[@Column4])*3600)+(([@Column8]-[@Column5])*60)+([@Column9]-[@Column6]))/60))),"")'); // Duration min
$objWorksheet->setCellValue("K$excelRow", '=IFERROR(IF(OR([@Column6]="",[@Column9]=""),"",(MOD(MOD(((([@Column7]-[@Column4])*3600)+(([@Column8]-[@Column5])*60)+([@Column9]-[@Column6])),3600),60))),"")'); // Duration sec