Home > Archive > PHP Pear > June 2004 > Re: [PEAR] Spreadsheet_Excel_Writer Help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] Spreadsheet_Excel_Writer Help
|
|
| Scott Mattocks 2004-06-24, 6:08 pm |
| I found the solution to my own problem. When I created the workbook I
did it with the optional file name like it says in the docs.
$workbook = new Spreadsheet_Excel_Writer('filename');
For some reason when I went to send the workbook using the
send('filename') method it would start the headers for the excel file
but then out put the web page.
I don't know if this is a bug, a documenation issue or me being dumb.
Scott Mattocks wrote:
> I am having some trouble with Spreadsheet_Excel_Writer. After I call
> send() and close() the document begins to download as expected but when
> I open the file it is an Excel version of the page I was just visiting.
> The correct file is in /tmp as OLE_PPS_Filejo0LoZ or some other random
> file name but it doesn't get sent as the download. Does anyone have any
> idea what may be going on here? I have recently upgraded to version 0.8.
>
> Thanks,
> Scott Mattocks
>
| |
| Scott Mattocks 2004-06-24, 6:08 pm |
| Justin Patrin wrote:
> I believe that the docs say not to use the filename if you want to send it.
The only mention of anything to that effect is in the Intro section
under the saving to a file section
You may have noticed also the following line:
// sending HTTP headers
$workbook->send('test.xls');
What that means is that we are sending our spreadsheet to a browser. But
what if we just want to save the spreadsheet in our machine? Well, you
just have to omit that line and give a valid file path to the workbook
constructor.
I guess I will take this up with the docs department.
Scott Mattocks
| |
| Justin Patrin 2004-06-24, 6:08 pm |
| I believe that the docs say not to use the filename if you want to send it.
On Thu, 24 Jun 2004 16:50:27 -0400, Scott Mattocks <scott@crisscott.com> wrote:
> I found the solution to my own problem. When I created the workbook I
> did it with the optional file name like it says in the docs.
> $workbook = new Spreadsheet_Excel_Writer('filename');
>
> For some reason when I went to send the workbook using the
> send('filename') method it would start the headers for the excel file
> but then out put the web page.
>
> I don't know if this is a bug, a documenation issue or me being dumb.
>
>
>
> Scott Mattocks wrote:
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40db3c9d23781514916534!
>
>
--
paperCrane --Justin Patrin--
|
|
|
|
|