profile
viewpoint

Ask questionsUncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Riepilogo!B2 -> Riepilogo!B4 -> Formula Error: An unexpected error occured

This is:

  • [x] a bug report
  • [ ] a feature request
  • [ ] not a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

I load an xlsx template I put some test data in cells Write the new file

What is the current behavior?

When reading, get: Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Riepilogo!B2 -> Riepilogo!B4 -> Formula Error: An unexpected error occured

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

To reproduce this bug, first you need to solve the ISSUE #181 as I suggested.

The excel formula is: =SE(SOMMA(B4:B80)='Liste presenze'!K8;" ";"ERRORE") in english =IF(SUM(B4:B80)='Liste presenze'!K8;" ";"ERRORE") To test you need an external excel file, that i attach

<?php
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
//Load the file template
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('tabellaperassociazioni.xlsx');

$worksheet = $spreadsheet->getActiveSheet();
//insert test data in some cells
$worksheet->getCell('C3')->setValue('API GENOVA');
$worksheet->getCell('C5')->setValue('22/06/2017');
$worksheet->getCell('A11')->setValue('Messina');
$worksheet->getCell('B12')->setValue('Dario');
$worksheet->getCell('C11')->setValue('Italiano');
$worksheet->getCell('H11')->setValue('ARENZANO');

$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xls');
//write the file
$writer->save('comunicazione.xls');

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet = develop PHP 7.0 tabellaperassociazioni.xlsx

PHPOffice/PhpSpreadsheet

Answer questions MarkBaker

Most of the examples here are using column or row ranges, which are not cleanly supported by PHPSpreadsheet's calculation engine; references to other sheets in formulae should work, unsupported column or row ranges do not, whether in the same sheet or another sheet

useful!
source:https://uonfu.com/
Github User Rank List