Re: Spreadsheet writer - not formating correctly
| From: | l Burnerheimerton | Date: | Wed, 03 Oct 2007 13:59:52 +0000 |
| Subject: | Re: Spreadsheet writer - not formating correctly | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28030@lists.php.net to get a copy of this message | ||
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