Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error reading file created with Excel 2004 for Mac #25

Open
GoogleCodeExporter opened this issue Apr 21, 2016 · 2 comments
Open

error reading file created with Excel 2004 for Mac #25

GoogleCodeExporter opened this issue Apr 21, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Attempting to import the attached Test.xls file will result in

Notice: Undefined property: rootentry in excel_reader2.php on line 232
Notice: Undefined index: in excel_reader2.php on line 232
Notice: Undefined index: in excel_reader2.php on line 195
[last error repeats infinitely]

Attached patch.diff appears to resolve the problem.

For reference this is excel_reader2.php Version 2.21 on a G5 PowerMac with OS X 
10.4.11 and PHP 
4.4.9 (cli) using Excel 2004 for Mac 11.5.4

Original issue reported on code.google.com by [email protected] on 29 May 2009 at 6:22

Attachments:

@GoogleCodeExporter
Copy link
Author

Actually, it could be the problem is that I am running this on PowerPC.  
Specifically, I am thinking the calls to 
unpack "ddouble" which are marked as "machine dependent".  Running on Intel 
(10.5.7) does not have this 
problem, and it appears that dates are coming across wonky on PowerPC but look 
fine in Intel.  sigh.

Original comment by [email protected] on 30 May 2009 at 5:24

@GoogleCodeExporter
Copy link
Author

OK, it appears the problem was endianess after all, and not some difference in 
the file format.  Converting the 
packed doubles to little endian seems to fix the problem.  Ignore the previous 
patch, attached is a new patch 
which checks endianess and converts to little endian if necessary.  I have 
tested it on both Intel and PowerPC 
macs.

Original comment by [email protected] on 30 May 2009 at 6:00

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant