Spreadsheet_Excel_Writer path problem
Posted
by rekha-sri
on Stack Overflow
See other posts from Stack Overflow
or by rekha-sri
Published on 2010-03-18T10:50:34Z
Indexed on
2010/03/18
11:41 UTC
Read the original article
Hit count: 413
php
Hi,
I have tried the following program for writing the contents into Spreadsheet. I downloaded the Spreadsheet_Excel_Writer package also.
<?php
ini_set('include_path','/xhome/rekha/public_html/PHP_FORUM/PHP/open_office/Spreadsheet_Excel_Writer-0.9.2/Spreadsheet/Excel/Writer.php');
$workbook = new Spreadsheet_Excel_Writer();
$workbook->send('grades.xls');
$format_bold =& $workbook->addFormat();
$format_bold->setBold();
$worksheet =& $workbook->addWorksheet();
$worksheet->write(0, 0, "NAME", $format_bold);
$worksheet->write(0, 1, "MARK1", $format_bold);
$worksheet->write(0, 2, "MARK2", $format_bold);
$worksheet->write(0, 3, "MARK3", $format_bold);
$worksheet->write(0, 4, "MARK4", $format_bold);
$worksheet->write(0, 5, "MARK5", $format_bold);
$worksheet->write(0, 6, "TOTAL", $format_bold);
$workbook->close();
?>
But while running this php program I got the following Fatal error.
Fatal error: Class 'Spreadsheet_Excel_Writer' not found in /xhome/rekha/public_html/PHP_FORUM/PHP/open_office/spread.php on line 4
Call Stack
# Time Memory Function Location
1 0.0003 59868 {main}( ) ../spread.php:0
I tried to solve this error.But I can't. Please can anyone help me to solve this error.
© Stack Overflow or respective owner