Search code examples
phppearspreadsheet-excel-writer

Development server using Spreadsheet_Excel_Writer not working?


I'm running the latest PHP and pear on a windows machine with apache 2.4 (XAMPP), I have installed the latest versions of OLE, PEAR and Spreadsheet_Excel_Writer. PEAR is installed and working.

However now instead of generating a download for the excel file on a specific page (generateexcel.php) and redirecting to the previous page, the page (generateexcel.php) is actually displayed (in the url with specific paramenters according to the date selected), it is blank. In the hosted version it works perfectly and is on a linux based server with apache 2.0 with PHP 5.3.18.

So basically on my development version it is not working, it is connecting to database and everything else on the site is working.

Is this a problem with the include_once and require_once for the Writer.php and the relative paths being incorrect because of being on windows.

Any assistance will be appreciated. Even if I could get some kind of error reporting it would be very useful. I will try: PEAR::isError() in the meantime.


Solution

  • Make sure the version of Spreadsheet_Excel_Writer and OLE are consistent with the code.

    ie. Uninstall and use previous versions, the same versions used on the server or when initial coding went down.