0

when I try to use the 'sum' function with phpspreadsheet, the output returns with '@'. The logical sequence works correctly (therefore the cells with which to add the sum are correct). SEE IMAGEcorrect). SEE IMAGEVEDERE IMMAGINE.

INPUT:

$spreadsheet->getActiveSheet()->setCellValue('E' . $row, '=SOMMA(E4:E' . $row_1 . ')');

OUTPUT:

enter image description here

Spino
  • 9
  • 2
  • `@` is the implicit Intersection operator, introduced in Excel 365. It will be included in a formula when you write to `.Formula` or `.Value`. To avoid it you must write to `.Formula2`. Does your library support that? – chris neilsen Feb 26 '22 at 23:24
  • i don't know, i use this package 'phpspreadsheet' – Spino Feb 27 '22 at 08:39
  • And i don't know how to write to .Formula2 – Spino Feb 27 '22 at 13:57

1 Answers1

1

Phpspreadsheet recognizes functions only in English.

That would be like this:

$spreadsheet->getActiveSheet()->setCellValue('E' . $row, '=SUM(E4:E' . $row_1 . ')');
armorking5
  • 11
  • 2
  • Hi, this was very helpful for me. I was getting a " ¿ NOMBRE ? " error in the cell of my Excel, it was because I was writting "SUMA" instead of "SUM". Thank you! – edier88 Nov 29 '22 at 19:18