Out of Memory reading Excel 2007 xlsx

Topics: Developer Forum, User Forum
Oct 9, 2007 at 10:24 PM
I've got an 8MB Excel2007.xlsx file that I'm trying to open and read content from. I'm trying to automate a database upload process.

When I open the file I get an out of memory PHP error. I've even updated the memory limit to 2GB and still get out of memory errors!

I've tried both 1.4.5 and 1.4.5b, with the same issue.

Any suggestions?
Oct 10, 2007 at 9:46 AM
Edited Oct 10, 2007 at 9:56 AM
Is it possible to send me the file?

m a a r t e n AT p h p e x c e l DOT n e t
Oct 11, 2007 at 5:28 PM
When I try to send the file to you I get an error:-

'm a a r t e n AT p h p e x c e l DOT n e t' on 10/11/2007 12:27 PM
This message is larger than the current system limit or the recipient's mailbox is full. Create a shorter message body or remove attachments and try sending it again.
<our.mail.server.local #5.2.3 smtp;450 5.2.3 Msg Size greater than allowed by Remote Host>

(i removed the spaces and put it to the correct address)

i'm guessing the size when it sends it UUENCODED is over 10MB, so your mailbox limit might be 10MB.

Oct 11, 2007 at 8:41 PM
Darn... Can you email me a download link where I can download your file?
Oct 12, 2007 at 8:25 AM
You can use setReadDataOnly() option, bu this still requires an excessive amount of memory due to the fact that your worksheet has +100.000 rows.

Pity PHP can't handle that amount of objects in memory :-(
Oct 20, 2007 at 6:26 PM
That worked. Thanks.

I wonder why it takes up so much more memory when you don't set the read only option.

Oct 22, 2007 at 6:51 AM
It creates a lot of objects for styling information, PHP does not seem to like that...