This is:
What is the expected behavior?
Parsing with styles enabled or disabled should not have a considerable different parsing time.
What is the current behavior?
A rather large file with ~6000 rows and 10 columns takes about 2 seconds to parse with $reader->setReadDataOnly(false)
but takes about 30 seconds with $reader->setReadDataOnly(true)
.
What are the steps to reproduce?
<?php
require __DIR__ . '/vendor/autoload.php';
// Takes 30 seconds
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile('large_spreadsheet.xlsx');
$document = $reader->load('large_spreadsheet.xlsx');
// Takes 2 seconds
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile('large_spreadsheet.xlsx');
$reader->setReadDataOnly(true);
$document = $reader->load('large_spreadsheet.xlsx');
Which versions of PhpSpreadsheet and PHP are affected?
PHP 5.6 and PHPSpreadsheet 1.5.0