@@ 101-107 (lines=7) @@ | ||
98 | ||
99 | $worksheetNames = []; |
|
100 | while ($xml->read()) { |
|
101 | if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) { |
|
102 | $xml->read(); // Move onto the value node |
|
103 | $worksheetNames[] = (string) $xml->value; |
|
104 | } elseif ($xml->name == 'gnm:Sheets') { |
|
105 | // break out of the loop once we've got our sheet names rather than parse the entire file |
|
106 | break; |
|
107 | } |
|
108 | } |
|
109 | ||
110 | return $worksheetNames; |
|
@@ 146-150 (lines=5) @@ | ||
143 | $xml->read(); // Move onto the value node |
|
144 | $tmpInfo['lastColumnIndex'] = (int) $xml->value; |
|
145 | $tmpInfo['totalColumns'] = (int) $xml->value + 1; |
|
146 | } elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) { |
|
147 | $xml->read(); // Move onto the value node |
|
148 | $tmpInfo['totalRows'] = (int) $xml->value + 1; |
|
149 | break; |
|
150 | } |
|
151 | } |
|
152 | $tmpInfo['lastColumnLetter'] = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); |
|
153 | $worksheetInfo[] = $tmpInfo; |