PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
When I visited the download section for xlsLib, there were two different files available for download. Judging from the file sizes, I inferred that one is the library itself and the other is the PHP extension. When I unzipped the library download file, it wasn't obvious to me how to install it. In the FAQ section of the xlsLib site under "Installing xlsLib", it reads:
[1] Installing xlsLib.
[1.1] What platforms are supported?
xlsLib is a multi-platform library an it has been successfully tested under GNU/Linux and WindowsXP systems.
Well, that's great, but it doesn't tell me how to install the thing. When extracted, I see that xlsLib comes with a README file - a blank README file. That's not helpful. Does anyone know of some decent documentation for this?
for one thing, it is still in alpha stages so it might not work properly yet. And seeing as there is no proper documentation, i would say you should wait a bit before using this library
<?php
/****************************************************************
* Script : Simple test example for PhpSimpleXlsGen
* Project : PHP SimpleXlsGen
* Author : Erol Ozcan <eozcan@superonline.com>
* Version : 0.2
* Copyright : GNU LGPL
* URL : http://psxlsgen.sourceforge.net
* Last modified : 18 May 2001
******************************************************************/
include( "psxlsgen.php" );
$myxls = new PhpSimpleXlsGen();
$myxls->totalcol = 2;
$myxls->InsertText( "Erol" );
$myxls->InsertText( "Ozcan" );
$myxls->InsertText( "This text should be at (3,0) if header was used, otherwise at (1,0)" );
$myxls->ChangePos(4,0);
$myxls->InsertText( "You must pay" );
$myxls->InsertNumber( 20.48 );
$myxls->WriteText_pos(4,2, "USD to use this class )" ); // hidden costs )
$myxls->SendFile();
Fatal error: Cannot redeclare sendfile() in c:\wwwroot\xls\psxlsgen-0.2\psxlsgen.php on line 147
Seems like their code should work as-is and I shouldn't have to debug it myself. The only thing I can think of is that I have to change something in php.ini or something like that. I couldn't find any installation instructions in the zip file or on the website.