# Excel 2007 export-import errors

**URL:** <https://www.dolibarr.org/forum/t/excel-2007-export-import-errors/17020>\
**Category:** Using my Dolibarr\
**Created:** [October 13, 2018, 2:21pm UTC](https://www.dolibarr.org/forum/t/excel-2007-export-import-errors/17020 "2018-10-13T14:21:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrea.a](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/ecb155/32.png) [@andrea.a](https://www.dolibarr.org/forum/u/andrea.a)\
**Post date:** [October 13, 2018, 2:21pm UTC](https://www.dolibarr.org/forum/t/excel-2007-export-import-errors/17020/1 "2018-10-13T14:21:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [October 13, 2018, 7:28pm UTC](https://www.dolibarr.org/forum/t/excel-2007-export-import-errors/17020/2 "2018-10-13T19:28:25Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![andrea.a](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/ecb155/32.png) [@andrea.a](https://www.dolibarr.org/forum/u/andrea.a)\
**Post date:** [October 13, 2018, 10:19pm UTC](https://www.dolibarr.org/forum/t/excel-2007-export-import-errors/17020/3 "2018-10-13T22:19:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andrea.a](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/ecb155/32.png) [@andrea.a](https://www.dolibarr.org/forum/u/andrea.a)\
**Post date:** [October 14, 2018, 7:53am UTC](https://www.dolibarr.org/forum/t/excel-2007-export-import-errors/17020/4 "2018-10-14T07:53:45Z")

</div>

I am answering to myself,

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