Skip to content

Commit

Permalink
fix: #24
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed Aug 28, 2024
1 parent a0d4563 commit 6648e99
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/FastExcelReader/Sheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ protected function getReader(string $file = null): InterfaceXmlReader
protected function _readHeader()
{
if (!isset($this->dimension['range'])) {
$this->dimension = [
'range' => '',
];
$xmlReader = $this->getReader();
$xmlReader->openZip($this->path);
while ($xmlReader->read()) {
Expand All @@ -346,11 +349,6 @@ protected function _readHeader()
$this->dimension = Helper::rangeArray($range);
$this->dimension['range'] = $range;
}
else {
$this->dimension = [
'range' => '',
];
}
}
if ($xmlReader->nodeType === \XMLReader::ELEMENT && $xmlReader->name === 'sheetView') {
$this->active = (int)$xmlReader->getAttribute('tabSelected');
Expand Down

0 comments on commit 6648e99

Please sign in to comment.