Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steven Jones’s picture

Title: PhpExcel » Proper XLS exports using PhpExcel

This could be done as a standalone module, either in this codebase or in another project.

Johann Wagner’s picture

Please find attached a patch that adds support for the PHPExcel library.

I also added a views option to choose Excel format (XLS or XLSX).

Johann Wagner’s picture

Status: Active » Needs review
Steven Jones’s picture

Status: Needs review » Closed (won't fix)

See this FAQ page: https://www.drupal.org/node/1820458

Sorry but VDE core will not support 'proper' XLS files, but feel free to create a project on Drupal.org that provides the export format for VDE and I'll add a link from the project page.

d.novikov’s picture

Status: Closed (won't fix) » Needs review

Please take a look at this module, which I have just released. Do not know if it is properly designed, but it runs XLSX export for me:
https://www.drupal.org/project/views_data_export_phpexcel

Anonymous’s picture

Thanks d.novikov.

I have been using a different php excel library (php_excel based on libXl) for other excel generation on my site. I was able to use that module as a base to get it to work with it.

Huntelaer’s picture

I got error message:

Fatal error: Class 'PHPExcel' not found in sites/all/modules/contrib/views_data_export/theme/views_data_export.theme.inc on line 343

I resolved this by including the library path

Status: Needs review » Needs work

The last submitted patch, 7: views_data_export-phpexcel_support-1269994-7.patch, failed testing.

The last submitted patch, 7: views_data_export-phpexcel_support-1269994-7.patch, failed testing.

annared’s picture

Fatal error: Class 'PHPExcel' not found in sites/all/modules/contrib/views_data_export/theme/views_data_export.theme.inc on line 343

I resolved this by including the library path

where did you include the library path?

apmsooner’s picture

apmsooner’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 11: views_data_export-phpexcel_support-1269994-11.patch, failed testing.

The last submitted patch, 11: views_data_export-phpexcel_support-1269994-11.patch, failed testing.

apmsooner’s picture

Status: Needs work » Needs review
kala4ek’s picture

Title: Proper XLS exports using PhpExcel » Proper XLS exports using PHPExcel
FileSize
4.84 KB

Updated patch according to latest dev release.
Also fixed few issues related to code style.

Status: Needs review » Needs work

The last submitted patch, 17: views_data_export-phpexcel_support-1269994-17.patch, failed testing.

The last submitted patch, 17: views_data_export-phpexcel_support-1269994-17.patch, failed testing.

kala4ek’s picture

ttournie’s picture

Hi,

Thanks for the patch !

For me this patch was not 100% working (issues with bulk export and xlsx format). I have modified it a little bit.

the patch is done from the 7.x-3.0-beta9

ttournie’s picture

I have added the trim of new line for a cleaner display.

Pls’s picture

#22 patch works great with PHPExcel class library. Thank you!

joey91133’s picture

Patch #22 is work without batch.

Dadaisme’s picture

Hi!

I applied the patch #22 whit no error.

But the xls and xlsx files obtained are gibberish, they are not recognised as excel files. Any idea why?

Thx

cchoe1’s picture

@dadaisme

I haven't tested it out but I know PHPExcel has been deprecated as of Jan 2019. So even if this bug isn't a result of that, you should probably know that any future bugs related to the library probably won't be fixed. Should consider rewriting this patch using PHPSpreadsheet which is the successor to PHPExcel.

interdruper’s picture