Re: Spreadsheet Excel Writer - append data to same file?
| From: | Justin Patrin | Date: | Mon, 11 Oct 2004 23:54:15 +0000 |
| Subject: | Re: Spreadsheet Excel Writer - append data to same file? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14862@lists.php.net to get a copy of this message | ||
On Mon, 11 Oct 2004 12:49:24 -0700, Kevin Kraeer
<kgkraeer@kraeeranimation.com> wrote:
> Hey everyone. Thanks so much for all your help installing Pear and
> working around the various issues with me. I finally got it installed
> properly, manually installed Spreadsheet Writer and OLE, and have been
> generating spreadsheets using dynamic data.
>
> So, the formatting will take some time but seems to be pretty
> straightforward.
>
> The only question I have left is, how do I append data to the same .XLS
> file? In the site I'm working on, different users will visit the form
> page and submit information. Currently, I've got the Writer code opening
> the XLS, writing the lines of data to a row, and closing. But then it
> seems the next time I visit the page and enter data, it just over writes
> the old stuff.
>
> Any ideers?
>
Well, you can't just append to it, Excel files don't work that way.
Currently there is no Excel *reading* code. All that Writer does is
write new excel files. If you're updating your data, I suggest putting
it into a database and making a script create the Excel file when a
user needs to download it.
--
paperCrane --Justin Patrin--