Answer the question
In order to leave comments, you need to log in
Why doesn't PHPExcel print the document?
I am using PHPExcel to fill in the template. As a result, it issues a document, everything fills in normally and opens. But when printing a document, Excel just throws an error and closes. For filling I use the following code:
require_once('PHPExcel.php');
require_once 'PHPExcel/IOFactory.php';
$objPHPExcel = PHPExcel_IOFactory::load('file/test.xlsx');
$objPHPExcel->setActiveSheetIndex(0);
$aSheet = $objPHPExcel->getActiveSheet();
$aSheet->setCellValue('B2', 'TEST');
require_once('PHPExcel/Writer/Excel2007.php');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setOffice2003Compatibility(true);
$objWriter->save('file/name.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question