Problem with Excel Export - empty file

Hello

I have some problems with export to Excel. I always get an error and an empty file.
I read some topics in this forum and started to modificate some lines … but nothing.

modification “generate.php”

<?php

require_once 'gridExcelGenerator.php';
require_once 'gridExcelWrapper.php';

error_reporting(E_ALL);               // new
ini_set("display_errors", 1);         // new

$debug = true;                        // changed to true
$error_handler = set_error_handler("PDFErrorHandler");                 // uncommented

if (get_magic_quotes_gpc()) {
	$xmlString = stripslashes($_POST['grid_xml']);
} else {
	$xmlString = $_POST['grid_xml'];
}
$xmlString = urldecode($xmlString);
if ($debug == true) {
	error_log($xmlString, 3, 'debug_'.date("Y_m_d__H_i_s").'.xml');
}

$xml = simplexml_load_string($xmlString);
$excel = new gridExcelGenerator();
$excel->printGrid($xml);

function PDFErrorHandler ($errno, $errstr, $errfile, $errline) {
	global $xmlString;
	if ($errno < 1024) {
		echo $errno." ".$errstr." ".$errfile." ".$errline;                 // new
		error_log($xmlString, 3, 'error_report_'.date("Y_m_d__H_i_s").'.xml');
//		exit(1);
	}

}

?>

Link to generate.php (displays errors?!)
http://www.umdispotool.de/mds/dp/dhtmlx/Grid/codebase/grid-excel-php/generate.php

The error_report file is empty. Debug File looks like my grid and i don’t see any errors.
If it’s nescessary i can post this one too.

Would be pretty good if someone can help me.

Thank you in advance.

Best regards

Oli

Hi,
please, enable ZipArchive in php.ini

Great Tip.

If someone has got the same problem. I updated my php.ini with the following two lines:

extension_dir="/usr/local/lib/php_modules/5-LATEST"
extension="zip.so"

Everything works fine :slight_smile:

Thank you again

Best regards
Oli