Slow reading of xlxs file

Topics: Developer Forum, User Forum
Nov 25, 2009 at 8:45 PM
Edited Nov 25, 2009 at 10:03 PM

I would like to start out by thanking you for the great work you have done with this project.  It has been extremely helpful!

I'm currently using version 1.7.1 with php version 5.2.11 and apache version 2.2.14.

I'm having a problem when reading in a relatively small xlsx file (less than 1.0 MB), specifically with a single page that has 8052 rows and 23 columns.  There are a total of 7 sheets with significantly less data in them as the main one.   I've used the setReadDataOnly(true) flag, and I've also tried to read just a single sheet at a time, but it takes about 69 seconds to read in this one sheet.  Do you have any suggestions how I can speed this up?

Thanks in advance,

Seiji

Coordinator
Nov 26, 2009 at 8:04 AM

That does seem an inordinately long time.

I just ran some tests against an xlsx file with 2 worksheets of 3,500 rows by 18 columns, and that took less than 4.5 seconds to read using the latest code, and 5.1 seconds using the 1.7.1 code (Windows, PHP 5.2.8, and a relatively slow processor).... so taking nearly 70 seconds for your workbook does seem excessive.

Quite how you can speed up the load I'm not sure. I assume you're explicitly instantiating the Excel2007 reader rather than letting the IO factory determine which reader to use.

I'll run a few more tests with some larger worksheets, see what settings/options have most affect on the load time.

Nov 26, 2009 at 9:57 PM
Edited Nov 26, 2009 at 9:59 PM

Hello,

I am not using the IO factory as I had thought that would add some unnecessary overhead.  I had also tried using Excel to convert the file to 2003 format and reading it that way, but it still takes over 60 seconds to read that single worksheet.

I look forward to hearing any suggestions you may have.

Developer
Nov 27, 2009 at 12:52 AM

Can you upload the file?

Please upload the file here so we can test:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10749

 

Dec 4, 2009 at 2:30 PM

Hello,

I hate to be a pest about this, but I need to get this working quickly or find another solution to reading this data.  Are there any suggestions for speeding up the read of the file that I uploaded?

Thanks

Developer
Jan 21, 2010 at 5:35 AM
okamosy wrote:

Hello,

I hate to be a pest about this, but I need to get this working quickly or find another solution to reading this data.  Are there any suggestions for speeding up the read of the file that I uploaded?

Thanks

I tried to load the xls file you uploaded. It took 69 seconds. There are well over 100,000 cells in that workbook. Right now that is somewhat more than what PHPExcel is good for.