Sending excel sheet to browser

I am running ScriptcaseV9.4.23 on windows 10

The task:
Fill a excel template with data from the database and the send it to the browser…

My Proiblem:
After the data is filled into the excel template it is sent to the browser. Trying this on the development system (with ‘run project’) it works as expected.
Deploying the app, correcting for the different path for the require_once and /tmp, it does send data to the browser, saying that a many errors have occured (a non-numeric value is encountered)…

The Code I use:
//delare use of library
require_once(’…/…/…/…’.$this->Ini->path_prod.’/third/phpexcel/PHPExcel/IOFactory.php’);

//loading the template from database into a file in /tmp

//create a reader
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);

// fill data into some cells
$objPHPExcel->getActiveSheet()->setCellValue($key,$value);
/!-!/
//prepare to send to browser
$objPHPExcel->setActiveSheetIndex(0);
//prepare header
$headerText=‘Content-Disposition:attachment;filename="’.$destFileName.’ "’;
header(‘Content-Type:application/vnd.ms-excel’);
header($headerText);
header(‘Cache-Control:max-age=0’);

//create writer for xls output
$objwriter=PHPExcel_IOFactory::createWriter($objPH PExcel, ‘Excel5’);

//output to browser
$objwriter->save(‘php://output’);

Suggestions and Help is very much needed and welcome.