Skip to content

Commit

Permalink
Fix for nuovo#59 and nuovo#60
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsp-sales committed Feb 4, 2014
1 parent ff46899 commit d19a0f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions SpreadsheetReader_XLSX.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,15 @@ public function Sheets()
$this -> Sheets = array();
foreach ($this -> WorkbookXML -> sheets -> sheet as $Index => $Sheet)
{
$Attributes = $Sheet -> attributes('r', true);
foreach ($Attributes as $Name => $Value)
{
if ($Name == 'id')
{
$SheetID = (int)str_replace('rId', '', (string)$Value);
break;
}
}

$Attributes = $Sheet -> attributes();
foreach ($Attributes as $Name => $Value)
{
if ($Name == 'sheetId') {
$SheetID = (int)$Value;
break;
}
}

$this -> Sheets[$SheetID] = (string)$Sheet['name'];
}
Expand Down Expand Up @@ -912,7 +912,7 @@ private function FormatValue($Value, $Index)
*/
public function rewind()
{
if ($this -> Index > 0 || !($this -> Worksheet instanceof XMLReader))
if ($this -> Index >= 0 || !($this -> Worksheet instanceof XMLReader))
{
// If the worksheet was already iterated, XML file is reopened.
// Otherwise it should be at the beginning anyway
Expand Down
Empty file added test2.php
Empty file.

0 comments on commit d19a0f8

Please # to comment.