From 6b32fd33fd2b6e857d832a650867b3fee649218f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Feb 2021 13:33:44 +0100 Subject: [PATCH] Fix export with excell --- ...el2007new.modules.php => export_excel2007.modules.php} | 8 ++++---- htdocs/install/upgrade2.php | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) rename htdocs/core/modules/export/{export_excel2007new.modules.php => export_excel2007.modules.php} (98%) diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php similarity index 98% rename from htdocs/core/modules/export/export_excel2007new.modules.php rename to htdocs/core/modules/export/export_excel2007.modules.php index eb111ebb985..b93a0a0c8de 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/export/export_excel2007new.modules.php + * \file htdocs/core/modules/export/export_excel2007.modules.php * \ingroup export * \brief File of class to generate export file with Excel format */ @@ -32,7 +32,7 @@ use PhpOffice\PhpSpreadsheet\Cell\Coordinate; /** * Class to build export files with Excel format */ -class ExportExcel2007new extends ModeleExports +class ExportExcel2007 extends ModeleExports { /** * @var string ID @@ -79,7 +79,7 @@ class ExportExcel2007new extends ModeleExports global $conf, $langs; $this->db = $db; - $this->id = 'excel2007new'; // Same value then xxx in file name export_xxx.modules.php + $this->id = 'excel2007'; // Same value then xxx in file name export_xxx.modules.php $this->label = 'Excel 2007'; // Label of driver $this->desc = $langs->trans('Excel2007FormatDesc'); $this->extension = 'xlsx'; // Extension for generated file by this driver @@ -199,7 +199,7 @@ class ExportExcel2007new extends ModeleExports require_once DOL_DOCUMENT_ROOT.'/includes/Psr/autoloader.php'; require_once PHPEXCELNEW_PATH.'Spreadsheet.php'; - if ($this->id == 'excel2007new') + if ($this->id == 'excel2007') { if (!class_exists('ZipArchive')) // For Excel2007, PHPSpreadSheet may need ZipArchive { diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index dabb826149c..c588959ae90 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4205,6 +4205,7 @@ function migrate_delete_old_files($db, $langs, $conf) '/core/modules/mailings/kiwi.modules.php', '/core/modules/facture/pdf_crabe.modules.php', '/core/modules/facture/pdf_oursin.modules.php', + '/core/modules/export/export_excel2007new.modules.php', '/api/class/api_generic.class.php', '/categories/class/api_category.class.php',