title: Why can't I add sumproduct formula?
body: <p>I tried to add a column named FTE containing this formula : </p>
  
  <pre><code>=I2/SUMPRODUCT(I:I,(M:M=M2) * (C:C=C2) * (N:N=N2))
  </code></pre>
  
  <p>This formula worked when applied in Excel, but when added from php, I just get an error:</p>
  
  <blockquote>
    <p>maximum execution time calculation.php phpexcel</p>
  </blockquote>
  
  <pre><code>$assembly = $arrayWorksheet-&gt;addColValByRow($assembly, 'FTE', ['= I', '/SUMPRODUCT(I:I,(M:M=M', ')*(C:C=C', ')*(N:N=N'], '))');
  // Output : =I2/SUMPRODUCT(I:I,(M:M=M2)*(C:C=C2)*(N:N=N2))
  </code></pre>
  
  <p>Sadly I can't figure out why. My initial formula was <code>SUMIFS</code> that I converted into <code>SUMPRODUCT</code>, because I know that <code>SUMIFS</code> isn't implemented yet.</p>
  
  <pre><code>function addColValByRow($worksheet, $title, $valArray, $finalVal = NULL) {
          // Take the last column
          $lastCol = key( array_slice( $worksheet[1], -1, 1, TRUE ) );
          $newCol = ++$lastCol;
          // tke the last cell
          $lastCell = key( array_slice( $worksheet, -1, 1, TRUE ) );
          $worksheet[1][$newCol] = $title;
  
          for ($i = 2; $i &lt;= $lastCell; $i++) {
              $worksheet[$i][$newCol] = "";
              foreach (array_keys($valArray) as $key) {
                  $worksheet[$i][$newCol] .= $valArray[$key] . $i;
              }
              if ($finalVal != NULL) {
                  $worksheet[$i][$newCol] .= $finalVal;
              }
          }
  
          return $worksheet;
      }
  </code></pre>