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
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