From c4f86130c169f872f6b6150e7726b9544f794ccd Mon Sep 17 00:00:00 2001 From: Igor Stojadinovic Date: Thu, 25 Jan 2018 14:55:30 +0100 Subject: [PATCH] XOL-3823 Fixed a bug that didn't allow multiple reports to be created in the same script/request --- Service/ExcelWriter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Service/ExcelWriter.php b/Service/ExcelWriter.php index e03011e..32d8b78 100644 --- a/Service/ExcelWriter.php +++ b/Service/ExcelWriter.php @@ -16,7 +16,6 @@ public function __construct(LoggerInterface $logger, PHPExcelFactory $phpExcel) { parent::__construct($logger); $this->phpexcel = $phpExcel; - $this->handle = $this->phpexcel->createPHPExcelObject(); \PHPExcel_Shared_Font::setAutoSizeMethod(\PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT); } @@ -27,6 +26,7 @@ public function __construct(LoggerInterface $logger, PHPExcelFactory $phpExcel) */ public function setup($filepath) { + $this->handle = $this->phpexcel->createPHPExcelObject(); $this->handle->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); $this->filepath = $filepath; }