Page 1 of 1

xlslib installation

Posted: Mon Dec 05, 2005 1:38 pm
by JasonTC
I need to dynamically generate XLS files. I searched the forum and found xlsLib:
http://xlslib.sourceforge.net/

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?

Thanks,
Jason

Posted: Mon Dec 05, 2005 3:06 pm
by Deemo
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

have you tried this project? PHP Simple XLS Generator

Posted: Mon Dec 05, 2005 3:34 pm
by JasonTC
Is there anything special I need to do to install it? When I unzipped it and tried to view the first sample file,

Code: Select all

<?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();
The following error was displayed:

Code: Select all

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.

Thanks,
Jason