You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you open an XLSX file and call ChangeSheet as your first operation, ChangeSheet will not change the sheet. This is because of the following condition in the rewind method:
if ($this -> Index > 0 || !($this -> Worksheet instanceof XMLReader))
This is because, if you haven't done anything,
$this->Index is 0 and $this->Worksheet is indeed an instance of XMLReader since the first sheet was loaded. So to fix this, either unset $this->Worksheet or set $this->Index to 1 in the ChangeSheet method, this way, rewind will successfully load the correct worksheet when it's called.
The text was updated successfully, but these errors were encountered:
martinsp-sales
added a commit
to martinsp-sales/spreadsheet-reader
that referenced
this issue
Feb 4, 2014
Hey there,
if ($this -> Index > 0 || !($this -> Worksheet instanceof XMLReader))
This is because, if you haven't done anything,
$this->Index is 0 and $this->Worksheet is indeed an instance of XMLReader since the first sheet was loaded. So to fix this, either unset $this->Worksheet or set $this->Index to 1 in the ChangeSheet method, this way, rewind will successfully load the correct worksheet when it's called.
The text was updated successfully, but these errors were encountered: