[Phpwm] Spreadsheet/Excel/Writer.php

James Timbrell jimbrell at gmail.com
Fri Nov 10 14:53:39 GMT 2006


It looks like others are having the same problem:

http://pear.php.net/bugs/bug.php?id=6584

I'll keep looking around. I can open the file fine when I try it.

Are you developing using a Linux server, or on windows with LAMP?

James.

On 10/11/06, alan dunn <alan at dunns.co.uk> wrote:
>
> yes, we tried this at first, then modified the content - still no
> difference.
>
> James Timbrell wrote:
> > Is this the example you tried?
> >
> >
> > <?php
> > require_once 'Spreadsheet/Excel/Writer.php';
> >
> > // Creating a workbook
> > $workbook = new Spreadsheet_Excel_Writer();
> >
> > // sending HTTP headers
> > $workbook->send('test.xls');
> >
> > // Creating a worksheet
> > $worksheet =& $workbook->addWorksheet('My first worksheet');
> >
> > // The actual data
> > $worksheet->write(0, 0, 'Name');
> > $worksheet->write(0, 1, 'Age');
> > $worksheet->write(1, 0, 'John Smith');
> > $worksheet->write(1, 1, 30);
> > $worksheet->write(2, 0, 'Johann Schmidt');
> > $worksheet->write(2, 1, 31);
> > $worksheet->write(3, 0, 'Juan Herrera');
> > $worksheet->write(3, 1, 32);
> >
> >
> >
> > // Let's send the file
> > $workbook->close();
> > ?>
> > If not, what happens when you try this?
> >
> >
> > James
> >
> > On 10/11/06, alan dunn <alan at dunns.co.uk> wrote:
> >>
> >> hi James
> >> I have:
> >> $workbook = new Spreadsheet_Excel_Writer();
> >>
> >> // sending HTTP headers
> >> $workbook->send('testfile.xls');
> >>
> >> // create the content
> >>
> >> $workbook->close();
> >>
> >> I copied the code right off the pear page!
> >>
> >> James Timbrell wrote:
> >> > Hi Alan,
> >> >
> >> > How is the .xls file getting to your desktop?
> >> >
> >> > The way I've used Spreadsheet_Excel_Writer is that the excel file
> gets
> >> > generated on the server in a specified directory, and once it's
> >> created
> >> I
> >> > show a hyperlink which the user can then click to download/open the
> >> file.
> >> >
> >> > Just wondering what your setup is.
> >> >
> >> > James.
> >> >
> >>
> >> _______________________________________________
> >> Phpwm mailing list
> >> Phpwm at mailman.lug.org.uk
> >> https://mailman.lug.org.uk/mailman/listinfo/phpwm
> >>
> >
> >
> >
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>



-- 

James Timbrell

email: james.timbrell at gmail.com
website: http://timbrell.com
Skype in: 0121 288 6680
Skype: jamestimbrell
AIM: jimbrell
MSN: jamestimbrell at hotmail.com


More information about the Phpwm mailing list