|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Spreadsheet_Excel_Writer problems
Hello everybody,
I am facing a problem while generating a excel sheet using Spreadsheet_Excel_Writer. Only for the testing purpose I am running a sample code to get the simplest excel sheet. Following is the code. <?php require_once 'Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $workbook->send('test.xls'); $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->close(); ?> This code creates the file but while opening it, MS Excel throws the following error. 'test.xls' cannot be accessed. The file may be readonly or you may be trying to access a readonly location, or the server the document is stored on may not be responding. Thanks |
|
#2
|
|||
|
|||
|
RE: Spreadsheet_Excel_Writer problems
The example code you show here is for output to browser. Run that script via browser.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > Spreadsheet_Excel_Writer problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|