#5 Wrong value returned for cells

v1.0 (example)
closed
nobody
None
5
2004-09-27
2004-08-17
Anonymous
No

When using PHP_Excel_Reader with Excel files created
using XP/2003 the values for each cell were truncated
by one character.

Changing line 637 from:
$this->addcell($row, $column, substr($this->data, $spos
+ 8, ord($this->data[$spos + 6]) |
ord($this->data[$spos + 7])<<8));

to:
$this->addcell($row, $column, substr($this->data, $spos
+ 9, ord($this->data[$spos + 6]) |
ord($this->data[$spos + 7])<<8));

Solved the problem.
Note the change is $spos + 9 not + 8.

Sorry I don't have a unified diff file.

Discussion

  • Logged In: YES
    user_id=947998

    please send me your xls file. I don't have any problem with
    Excel XP/2003 files.

     
    • status: open --> closed