Excel 2007 export-import errors

Hi to everybody,
I am pretty new to dolibarr, and I really like it.

Here below as suggested my environment.


DOLIBARR ENVIRONMENT
- Version: [8.0.2]
- Operating System: [Linux 4.15.0-36-generic #39-Ubuntu SMP UTC 2018 i686]
- Web Server: [Apache/2.4.29 (Ubuntu)]
- PHP: [7.2.10-0ubuntu0.18.04.1]
- Database: [MySQL or MariaDB 5.7.23-0ubuntu0.18.04.1]
- URL(s): [Affected URL(s)]


b I have a problem, mine is a fresh installation.[/b]
I would like to import-export data, at least from products tables.
I have enabled the 2 modules import and export,
The problem is that at the moment I have to generate the file by choosing the model type (CSV / TSV /Excel 95 / Excel 2007)
The Excel 2007 format does not work, I am routed to an HTTP ERROR 500
/htdocs/exports/export.php?step=5&datatoexport=produit_1
The others 3 (CSV / TSV /Excel 95) works normally!

Note:
- In my php.ini I have set this: open_basedir = /var/www/html:/var/tmp:/var/lib/php/sessions
- And in /var/www/html/dolibarr/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php has R & W permitions exactly like the Excel5.php that works.

Somebody can help here ???
Thank you in advance.

Hi,

Error 500 means php has crashed.
Please open the php logs to see what is going wrong.

Thanks for your answer.
This s what I’ve found in my php_errrors.log
Like a black-hole for me :happy:

This is my php_errors.log
PHP Fatal error: Class ‘XMLWriter’ not found in /var/www/html/andrea/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/X$
[14-Oct-2018 00:09:21 Europe/Berlin] PHP Stack trace:
[14-Oct-2018 00:09:21 Europe/Berlin] PHP 1. {main}() /var/www/html/andrea/htdocs/exports/export.php:0
[14-Oct-2018 00:09:21 Europe/Berlin] PHP 2. Export->build_file() /var/www/html/andrea/htdocs/exports/export.php:279
[14-Oct-2018 00:09:21 Europe/Berlin] PHP 3. ExportExcel2007->close_file() /var/www/html/andrea/htdocs/exports/class/export.class.php:659
[14-Oct-2018 00:09:21 Europe/Berlin] PHP 4. PHPExcel_Writer_Excel2007->save() /var/www/html/andrea/htdocs/core/modules/export/export_excel2007.modules.php:110
[14-Oct-2018 00:09:21 Europe/Berlin] PHP 5. PHPExcel_Writer_Excel2007_ContentTypes->writeContentTypes() /var/www/html/andrea/htdocs/includes/phpoffice/phpexcel/Class$

Some suggestions ?
Thank you

I am answering to myself,

I’ve added sudo apt-get install php-xml
Now the excel 2007 (.xlsx) has been generated
Seems OK

1 Like