Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Worksheet!C19981 -> Formula Error: #294

Closed
1 task
djeraseit opened this issue Dec 17, 2017 · 1 comment
Labels

Comments

@djeraseit
Copy link

djeraseit commented Dec 17, 2017

This is:

  • a bug report

What is the expected behavior?

Data is read successfully. Simple CSV. Should not be doing any calculations

What is the current behavior?

It hiccups partway through the file

PHP Fatal error:  Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Worksheet!C19981 -> Formula Error: An unexpected error occured in /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php:273
Stack trace:
#0 /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(2551): PhpOffice\PhpSpreadsheet\Cell\Cell->getCalculatedValue()
#1 /l/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(2626): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->rangeToArray('A1:AY20099', NULL, true, true, true)
#2 //includes/functions.php(1009): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->toArray(NULL, true, true, true)
#3 /includes/import-single-spreadsheet.php(53): importCSV('xxxx', 'https://www.who...')
#4 {main}
  in /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php on line 273

Fatal error: Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Worksheet!C19981 -> Formula Error: An unexpected error occured in /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php:273
Stack trace:
#0 /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(2551): PhpOffice\PhpSpreadsheet\Cell\Cell->getCalculatedValue()
#1 /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(2626): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->rangeToArray('A1:AY20099', NULL, true, true, true)
#2 /public_html/includes/functions.php(1009): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->toArray(NULL, true, true, true)
#3 //includes/import-single-spreadsheet.php(53): importCSV('xxxx', 'https://www.who...')
#4 {main}
  in /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php on line 273

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:

<?php

require __DIR__ . '/vendor/autoload.php';

try {
$spreadsheet = $reader->load($filename);
} catch(\PhpOffice\PhpSpreadsheet\Reader\Exception $e) {
    die('Error loading file: '.$e->getMessage());
}

    //  Do some processing here
$rows = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
    // var_dump($rows);

Which versions of PhpSpreadsheet and PHP are affected?

php 7.0

@PowerKiKi
Copy link
Member

Please provide a Minimal, Complete, and Verifiable example of code that exhibits this issue without relying on an external Excel file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants