ONE HUGE and one small bug

Topics: Developer Forum, Project Management Forum, User Forum
Jun 4, 2011 at 10:21 AM

Since the email  maarten@phpexcel.net  was invalid I am copy-pasting the email here:

Dear Mr Maarten
Hello my name is George Pligor and I am a developer from Greece. I have benefited much from the project PHPExcel. In fact I made a small donation :) Although I am curious about why there is no change at the donation bar. It writes 870.00$ as the first time I checked your site..

Anyway I have two(2) bugs to mention:

Before I proceed I should mention that I apply PHPExcel on Excel5 (.xls) files. I should also mention that I would happily send you any information or files that could help you reproduce the problem and thus fix these bugs :)

Firstly there is some issue with the "calculations" function. I guess when there is some row or column full of a background color, or maybe full of borders the calculation crashes and the file is not loaded. So far I overcome this problem by using a "ReadFilter" which constraints the number of rows and specifies which columns to be read. But the problem remains when using an excel file with unknown number of rows or columns

Secondly and MOST importantly I would like to mention this bug: If you have =C5+B4 this is a reference to cells inside the same sheet. Then if you have =SHEETNAME!A10 then you have a reference to a cell in the specified sheet.
PHPExcel does NOT take into account the third option. REFERENCE TO ANOTHER .XLS FILE: 'C:\some_path\[some_excel_filename.xls]SHEETNAME'!A10
I guess you would have to load the other file and read the data. So far the loader crashes.

I would greatly appreciate If you could fix this. Is it possible to happen relatively soon? :)

Thank you and once more excellent work to all of the team of this project!

Coordinator
Jun 6, 2011 at 10:27 PM

Regarding your first problem:

When you say the calculation crashes, can you explain exactly what you mean? What is the calculation? Are any error messages displayed or written to the log? What does a calculation log show?

 

Regarding the second problem:

This isn't a little thing, but a very big one, and there is a Work Item for it (See Artistan's problem here). While I know how to resolve this, it's an enormous performance and memory overhead, loading external workbooks that may or may not be accessible on the web server, making it impractical to implement.

Jun 7, 2011 at 11:26 AM

Yes in fact the problems were not in order. The huge problem is the one where PHPExcel fails to load linked .xls files.

About the first problem, when I said calculation I saw an exception thrown from inside calculation.php. Is there a calcultion function as well? I didn't look it up. Of course if you would like me to I could send you the steps which reproduce the problem (simply loading a .xls file and then saving it). I only guess that the infinite borders is the problem, I am not exactly sure. Would you like me to send you the .xls file as well to an email or rapidshare link ?..

As far as the problem with the linked .xls files is concerned I am not suggesting such an extreme dynamic way as you imagine.
But let's take thing from the beginning.

I live in Greece. You know Greece, the new beloved case study for all economists at least the for last past year (:

My company is using Excel to store all kinds of data.... ==>CHAOS !!
Only think about many many columns and hundred or more sheets per .xls file !!! ==> HELL !!

Since the system is (already) unsustainable all data must pass to a database. BUT automatically, so this is where PHPExcel plays the main role.

First of all please do not be concerned about a web server crashing. Only because I use php scripts in cli. Some scripts take longer than 5 minutes to run!!

As you said I understand how things could get messy if you would read dynamically data from another .xls. But no need to do that. I only ask, just when the child .xls file loads would load the .xls parent (one level parent-child depth is enough for now), read the calculated values of the parent cells and pass them as static values at the child.

so the reference to the parent.xls file: 'C:\some_path\[parent.xls]SHEETNAME'!A10 would be conveted to value '10' or value 'Maria' or whatever is the calculated value of this cell.

So after this load, we close the parent.xls file and release the memory.

For the rest of the script we forget about the parent.xls file and do our work only on child.xls file with the classes and methods which already exist in PHPExcel (:

Even further you could use (btw do you know any other way to do that?) this line

if($argc) { /*...*/ }

so you could separate the cli from the cgi php. Maybe you wanted to prevent such a load with the cgi mode to save webserver resources as you said :)

Hope to resolve this soon

Jul 6, 2011 at 11:23 AM

I renew this request as a major request

OR at least could you give me some directions on which functions/methods to look inside the source code of PHPExcel to solve it myself?

OR any other indirect solution is welcome :)

Thank you in advance!