You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template file uses them in 2 columns, which should be the multiplication formulas for each row, but only the first row gets the correct values, '=E6*C6' and '=E6*D6'
The other cells get their values as '=E9*D9' and the cell to the right has '=E10*D10'
The indexes for each cell are changed as if the cell count somehow interferes in the string used for the formulas.
Even weirder is that the values are changed as if some regex acts on the string, changing every cell in the resulting spreadsheet.
I could even trace some data change into phpoffice/phpspreadsheet but was unable to find what could be happening before the data changed.
The text was updated successfully, but these errors were encountered:
Not sure if this bug has appeared/fixed somewhere, but I couldn't find any help, and I've been trying it all day:
I have this loop in my code:
foreach($report as $prod){ $sheetParams['{id_produto}'][$idx] = $prod['codigo']; $sheetParams['{product_name}'][$idx] = $prod['titulo']; $sheetParams['preco_compra'][$idx] = $prod['preco_compra']; $sheetParams['preco_venda'][$idx] = $prod['precoVenda']; $sheetParams['qde'][$idx] = (int)$prod['qde']; $sheetParams['[subtotalcompra]'][$idx] = '=E'. ($idx+6) . '*C'.($idx+6); $sheetParams['[subtotalvenda]'][$idx] = '=E'. ($idx+6) . '*D'.($idx+6); $sheetParams['[lucro_bruto]'][$idx] = '=G'. ($idx+6) . '-F'.($idx+6); $idx++; }
After filling the arrays, I send it using
PhpExcelTemplator::saveToFile($templateFile, $fileName, $sheetParams);
one of the arrays ([subtotalcompra]) gets the values:
[[subtotalcompra]] => Array ( [0] => '=E6*C6' [1] => '=E7*C7' )
whereas the other ([subtotalvenda]) is
[[subtotalvenda]] => Array ( [0] => '=E6*D6' [1] => '=E7*D7' )
The template file uses them in 2 columns, which should be the multiplication formulas for each row, but only the first row gets the correct values, '=E6*C6' and '=E6*D6'
The other cells get their values as '=E9*D9' and the cell to the right has '=E10*D10'
The indexes for each cell are changed as if the cell count somehow interferes in the string used for the formulas.
Even weirder is that the values are changed as if some regex acts on the string, changing every cell in the resulting spreadsheet.
I could even trace some data change into phpoffice/phpspreadsheet but was unable to find what could be happening before the data changed.
The text was updated successfully, but these errors were encountered: