This repository has been archived by the owner on Jan 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
parseFormula exception on mbstring named range #1197
Comments
Could you provide a Minimal, Complete, and Verifiable example of code that exhibits this issue without the use of external file please ? |
Is this good enough? $objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'kiki');
$objPHPExcel->addNamedRange( new PHPExcel_NamedRange(html_entity_decode('cliché'), $objPHPExcel->getActiveSheet(), 'A1'));
PHPExcel_Calculation::getInstance($objPHPExcel)->parseFormula(html_entity_decode('=cliché')); |
thanks ! I can reproduce it even in PhpSpreadsheet: require __DIR__ . '/vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\NamedRange;
use PhpOffice\PhpSpreadsheet\Calculation;
$objPHPExcel = new Spreadsheet();
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'kiki');
$name = html_entity_decode('cliché');
$objPHPExcel->addNamedRange(new NamedRange($name, $objPHPExcel->getActiveSheet(), 'A1'));
$res = Calculation::getInstance($objPHPExcel)->parseFormula('=' . $name);
var_dump($res); |
Good job with PhpSpreadsheet by the way, any release date in sight? |
@PowerKiKi Did you file a bug report on PhpSpreadsheet as well? If so, can you provide a link ? |
No, I didn't file an issue on PhpSpreadsheet. I wish we could move issue across projects... A beta release is planned "soon"... |
I copied this bug-report to PhpSpreadsheet, see it there: PHPOffice/PhpSpreadsheet#179 |
Closing here |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As confirmed by @MarkBaker, PHPExcel_Calculation::parseFormula() should handle multibyte named ranges. However the following call fails (cliché is a named range):
PHPExcel_Calculation::getInstance()->parseFormula('=cliché');
It throws a
PHPExcel_Calculation_Exception
with messageThe text was updated successfully, but these errors were encountered: