Re: Spreadsheet writer - not formating correctly
| From: | Daniel García | Date: | Wed, 03 Oct 2007 14:40:18 +0000 |
| Subject: | Re: Spreadsheet writer - not formating correctly | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28032@lists.php.net to get a copy of this message | ||
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 betal 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:tried toI copied the simple example from the docs andI have used this before but it's been a while. Ihaveopenoffice on my desktop and not excel.open it. It asked which file format and, as thedocstell you, I put Excel 5.0. It threw an error"Unknownor 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 theInternet 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