Is it possible to use PHPExcel classes inside 'Views data' module?
They schould really help in getting normal XLS and XLSX files...
Is it possible to use PHPExcel classes inside 'Views data' module?
They schould really help in getting normal XLS and XLSX files...
Comments
Comment #1
steven jones commentedThis could be done as a standalone module, either in this codebase or in another project.
Comment #2
Johann Wagner commentedPlease find attached a patch that adds support for the PHPExcel library.
I also added a views option to choose Excel format (XLS or XLSX).
Comment #3
Johann Wagner commentedComment #4
steven jones commentedSee 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.
Comment #5
d.novikov commentedPlease 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
Comment #6
Anonymous (not verified) commentedThanks 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.
Comment #7
huntelaer commentedI 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
Comment #10
annared commentedwhere did you include the library path?
Comment #11
apmsooner commentedRevised patch in #7 to attempt to pass test.
Comment #12
apmsooner commentedComment #15
apmsooner commentedComment #16
apmsooner commentedComment #17
kala4ekUpdated patch according to latest dev release.
Also fixed few issues related to code style.
Comment #20
kala4ekOops, wrong branch.
Reroll #17
Comment #21
ttournie commentedHi,
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
Comment #22
ttournie commentedI have added the trim of new line for a cleaner display.
Comment #23
Pls commented#22 patch works great with PHPExcel class library. Thank you!
Comment #24
joey91133 commentedPatch #22 is work without batch.
Comment #25
dadaisme commentedHi!
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
Comment #26
cchoe1 commented@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.
Comment #27
interdruper commentedFor D9 and PHPSpreadsheet library try https://www.drupal.org/project/views_data_export_phpspreadsheet
Comment #28
steven jones commentedSorry 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 :)