PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #3669

Empty Worksheet

Details

Submitted2005-03-02 14:22 UTC
FromKirsten dot Schulte at gmx dot net
StatusBogus
PackageSpreadsheet_Excel_Writer
PHP VersionIrrelevant
OSLINUX (SUSE 9.0)
Roadmaps(Not assigned)

Comments

[2005-03-02 14:22 UTC] Kirsten dot Schulte at gmx dot net

Description:
------------
I put a source online which worked weel on my local system (Windows 2000 Prof.; Apache 1.3 also 2; PHP 4.3.8 and 4.3.9), but to my suprise it dosn't work on the online system (LINUX SUSE 9.0; Apache 1.3; PHP 4.3.9 also 4.3.3)
It is a simple Script (see below) only for the test but from the online system i get a workbook with a empty worksheet named something like 'xls.test'

Reproduce code:
---------------
require_once('Spreadsheet/Excel/Writer.php');

$workbook = new Spreadsheet_Excel_Writer();

// HTTP Header senden
$workbook->send('test.xls');
$myworksheet1 =& $workbook->addWorksheet('One');

$format_bold =& $workbook->addFormat();
$format_bold->setBold();

$myworksheet1->write(0, 0, "Feld 1", format_bold);
$myworksheet1->write(0, 1, 0);
$myworksheet1->write(1, 0, "Feld 2", format_bold);
$myworksheet1->write(1, 1, 0);

$workbook->close();

[2005-05-24 15:10 UTC] tobias at schittkowski dot de

I experience the same problem, any workaround yet?
Tobias

[2005-05-31 05:57 UTC] trojahn at trojahn-horse dot de

I experience the same problem. The OLE package needs rights to generate files in the temp directory and on my "Online-system" "safe mode" and "base dir restriction" are on. This is the reason for my problem.
I tried
$xls =& new Spreadsheet_Excel_Writer();
$xls->setTempDir('/usr/local/httpd/htdocs/kunden/web1/html/temp');
.....

and this works fine.

[2005-07-19 19:40 UTC] Kirsten dot Schulte at gmx dot net

Hi,

take a time before i can make the test.
Problem is finished with that solution, thanx a lot.
Works fine now like on all other systems.

regardes Kirsten

[2006-02-02 23:16 UTC] ragaskar at gmail dot com

this fixed my problem too! Took some searching. Wish the tutorials mentioned this, as anyone running this from a shared hosting situation that is less than perfect will probably run into this problem.