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

Issue summary: View changes
StatusFileSize
new5.3 KB

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

Revised patch in #7 to attempt to pass test.

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

StatusFileSize
new5.35 KB
apmsooner’s picture

Status: Needs work » Needs review
kala4ek’s picture

Title: Proper XLS exports using PhpExcel » Proper XLS exports using PHPExcel
StatusFileSize
new4.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

Status: Needs work » Needs review
StatusFileSize
new4.89 KB

Oops, wrong branch.
Reroll #17

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

steven jones’s picture

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

Sorry for the lack of attention to your issue, please accept my apologies.

Drupal 7 is going to be end-of-life'd by the community in approximately 1 month.

As such, I am closing all non-critical looking, non-PHP compatibility issues for Views Data Export to tidy up the issue queues and reduce the noise. You can read about this on #3492246: Close down Drupal 7 issues.

If you feel like this issue has been closed by mistake, please do comment about re-opening it.
If you feel like the ticket is still relevant for the 8.x-1.x version of the module, then please search for a duplicate issue first, and if there really isn't one (and you've looked properly) then change the version on the ticket and re-open.

Thanks to everyone involved in this issue: for reporting it, and moving it along, it is truly appreciated.
The Drupal community wouldn't be what it is today without your involvement and effort, so I'm sorry that we couldn't get this issue resolved. Hopefully we'll work together in a future issue though, and get that one resolved :)