Re: excel spreadsheet writer

From: Date: Sat, 25 Aug 2007 13:50:03 +0000
Subject: Re: excel spreadsheet writer
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27849@lists.php.net to get a copy of this message
izgordu@uzem.itu.edu.tr wrote:
Hi, i am trying to create an xls file using the pear class, but i have a problem: during the script, i record some data to xls from time to time. but if the internet connection or electric are cut, so if the script doesn't end, i get a blank xls file. *************************** $xls = create a new xls write $data1 to $xls do other things write $data2 to $xls =============>>>>>> power cut hapens now write $data3 to $xls close $xls ************************* in such cases i want to get the xls file including $data1 and $data2 what should i do?
It seems to me that you'd be better off periodically writing your data to a log file of some sort and only creating the spreadsheet at the time you need it. That would be a lot quicker and safer, i think, than the alternative, which would be to create and save the spreadsheet; re-open it to append data and save it; repeat as necessary. Writing to a log file will be much faster.

« previous php.pear.general (#27849) next »