Re: Spreadsheet writer - not formating correctly
| From: | l Burnerheimerton | Date: | Wed, 03 Oct 2007 15:16:01 +0000 |
| Subject: | Re: Spreadsheet writer - not formating correctly | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28034@lists.php.net to get a copy of this message | ||
I have further determined the file generated, is 0
bytes - there's nothing saved to be viewed which is
probably the cause of the format error.
I have tried several working examples and they all
create a 0 byte file.
My install is
PHP 4.3
OpenOffice 2.3
OLE 0.5 beta
Spreadsheet_Excel_Writer 0.9.1 beta
--- Daniel García <listas@quintopino.com> wrote:
> It worked fine for me :-(, no idea what the problem
> can be...
>
> Here's my installation
>
> PHP 5.1.6
> OpenOffice 1.9
> OLE 0.5
> beta
> Spreadsheet_Excel_Writer 0.9.1
> beta
>
>
>
>
> l Burnerheimerton wrote:
> > Thanks Daniel. Here's the exact contents of the
> page
> > that isn't working and is the sample given in the
> > docs:
> > <?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();
> > ?>
> > --- Daniel García <listas@quintopino.com> wrote:
> >
> >
> >> I'd check that *nothing* (including spaces) is
> sent
> >> to the browser
> >> before sending the xls file. hth :-)
> >>
> >> -Daniel
> >>
> >> l Burnerheimerton wrote:
> >>
> >>> I have used this before but it's been a while.
> I
> >>>
> >> have
> >>
> >>> openoffice on my desktop and not excel.
> >>>
> >>> I copied the simple example from the docs and
> >>>
> >> tried to
> >>
> >>> open it. It asked which file format and, as the
> >>>
> >> docs
> >>
> >>> tell you, I put Excel 5.0. It threw an error
> >>>
> >> "Unknown
> >>
> >>> or unsupported Excel file format."
> >>>
> >>> So I saved it and sent it to a computer with
> Excel
> >>> 2003 and I got the same error.
> >>>
> >>> I have the latest OLE and
> Spreadsheet_Excel_Writer
> >>> version.
> >>>
> >>> Any ideas what's going wrong?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >
>
____________________________________________________________________________________
> >
> >>> Take the Internet to Go: Yahoo!Go puts the
> >>>
> >> Internet in your pocket: mail, news, photos &
> more.
> >>
> >>> http://mobile.yahoo.com/go?refer=1GNXIC
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Got a little couch potato?
> > Check out fun summer activities for kids.
> >
>
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
>
> >
> >
>
>
____________________________________________________________________________________
Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.
http://tv.yahoo.com/