Reply to issue - Pear's Spreadsheet_Excel_Writer creates a 0 byte file

Your name:

Reply:


Posted by Paul on 10/03/07 17:30

When I run the code below, it create a file but it is 0 bytes and throws an
error when I try to open it, "Unknown or unsupported file format."

Here's the test code:
<?php
require_once 'Spreadsheet/Excel/Writer.php';
$workbook = new Spreadsheet_Excel_Writer();
$worksheet =& $workbook->addWorksheet('My first worksheet');
$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);
$workbook->send("test.xls");
$workbook->close();
?>

My installation is:
PHP 4.3
OpenOffice 2.3
OLE 0.5 beta
Spreadsheet_Excel_Writer 0.9.1 beta

Any ideas what's going wrong?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация