mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 21:36:05 +03:00
Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML
This commit is contained in:
parent
0ad3f67da6
commit
907ad1ef66
@ -209,7 +209,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
|
|||||||
$currCells = 0;
|
$currCells = 0;
|
||||||
while ($xml->read()) {
|
while ($xml->read()) {
|
||||||
if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) {
|
if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) {
|
||||||
$tmpInfo['totalRows']++;
|
$row = $xml->getAttribute('r');
|
||||||
|
$tmpInfo['totalRows'] = $row;
|
||||||
$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
|
$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
|
||||||
$currCells = 0;
|
$currCells = 0;
|
||||||
} elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) {
|
} elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) {
|
||||||
|
@ -213,7 +213,9 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
|||||||
do {
|
do {
|
||||||
$xml->read();
|
$xml->read();
|
||||||
if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) {
|
if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) {
|
||||||
$tmpInfo['totalRows']++;
|
$rowspan = $xml->getAttribute('table:number-rows-repeated');
|
||||||
|
$rowspan = empty($rowspan) ? 1 : $rowspan;
|
||||||
|
$tmpInfo['totalRows'] += $rowspan;
|
||||||
$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
|
$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'],$currCells);
|
||||||
$currCells = 0;
|
$currCells = 0;
|
||||||
// Step into the row
|
// Step into the row
|
||||||
|
@ -38,6 +38,7 @@ Fixed in develop branch:
|
|||||||
- General: (amironov ) Work item GH-84 - Search style by identity in PHPExcel_Worksheet::duplicateStyle()
|
- General: (amironov ) Work item GH-84 - Search style by identity in PHPExcel_Worksheet::duplicateStyle()
|
||||||
- General: (karak) Work item GH-85 - Fill SheetView IO in Excel5
|
- General: (karak) Work item GH-85 - Fill SheetView IO in Excel5
|
||||||
- General: (cfhay) Work item 18958 - Memory and Speed improvements in PHPExcel_Reader_Excel5
|
- General: (cfhay) Work item 18958 - Memory and Speed improvements in PHPExcel_Reader_Excel5
|
||||||
|
- General: (MBaker) Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML
|
||||||
- Bugfix: (techhead) Work item GH-70 - Fixed formula/formatting bug when removing rows
|
- Bugfix: (techhead) Work item GH-70 - Fixed formula/formatting bug when removing rows
|
||||||
- Bugfix: (alexgann) Work item GH-63 - Fix to cellExists for non-existent namedRanges
|
- Bugfix: (alexgann) Work item GH-63 - Fix to cellExists for non-existent namedRanges
|
||||||
- Bugfix: (MBaker) Work item 18844 - cache_in_memory_gzip "eats" last worksheet line, cache_in_memory doesn't
|
- Bugfix: (MBaker) Work item 18844 - cache_in_memory_gzip "eats" last worksheet line, cache_in_memory doesn't
|
||||||
|
Loading…
Reference in New Issue
Block a user