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