Needs review
Project:
Views Excel Export
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 May 2011 at 19:18 UTC
Updated:
5 Jul 2013 at 14:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
ywarnier commentedAttaching the patch. This is the fruit of collaborative work between @albert1t0, @rcechang, @chaskytux, @xjkwak and myself during the Drupal Code Sprint Perú May 2011: http://groups.drupal.org/node/144519
Note: there are still a few Windows end-of-line markers apparently, I haven't been able to remove them, but appart from that the patch is functional and respects all other Drupal coding conventions. Built on the dev version of 6.x-1.x branch (apparently not different from master).
Comment #2
creaoy commentedHi,
I can give you access to the project and you can release this as second dev version.
Will this work for you? I just don't have time to work on this now.
Thanks, Johnny
Comment #3
ywarnier commentedWhy not... don't have much time either but I'll try to make some space for that over the week-end.
Comment #4
morbiD commentedA note to anyone trying to test this patch: Make sure to clear all your caches after patching and setting up a PHPExcel view. Otherwise, you might get "Page not found" errors when you try to access your PHPExcel feed.
Anyway, I've just tried it out and it seems to work well.
Comment #5
ywarnier commentedHaven't had time to patch and submit yet, but for the impatient, I thought I might just upload a small package with my latest improvements for now (there was a bug when having more than 26 columns and passing over the "Z" column label - now fixed).
Please note that you still need to download the phpexcel library from Codeplex: http://phpexcel.codeplex.com/ (huge file) and unzip it in the sites/all/libraries/ directory.
Comment #6
sylvaticus commentedHello, after installing the module in #5 (rm -rf [old]) I have a WSOD in /admin/settings/views2excel
With the WSOD module I got this message:
array(4) { ["type"]=> int(64) ["message"]=> string(194) "require_once() [function.require]: Failed opening required 'sites/all/modules/views_export_xls/views_export_xls.admin.inc' (include_path='.:/usr/local/share/pear')" ["file"]=> string(51) "/www/agriregioni/elearning/drupal/includes/menu.inc" ["line"]=> int(347) } n/a
Comment #7
sylvaticus commentedok.. in the provided tgz the file is "view_export_xls.admin.inc" instead of "views_export_xls.admin.inc" (with the s).
Simple renamed and it works, but still it cant's see the phpexcel class I placed in /sites/all/libraries/ ???
Comment #8
ywarnier commentedHi Sylvaticus,
Sorry for the delay. Thanks for spotting the "s" problem (don't know how I could have missed it). The view is available as a "feed" display, then you have to pick "phpexcel". Hope this is what you were looking for.
Comment #9
ywarnier commented... and the library has to be in sites/all/libraries/phpexcel/ (it looks for sites/all/libraries/phpexcel/Classes/PHPExcel.php)
Comment #10
RobertoGA commentedHi ywarnier,
Thanks for patch it.
PHPExcel.php is readable at 'sites/all/libraries/phpexcel/Classes' but the module doesn't see it and then... I cannot use it. Someone has this problem before? Attach a screenshot of the admin site.
Comment #11
steveoliver commentedHere's a patch against 6.x-1.x (dbdb6af) with changes from @ywarnier's #5, plus README.txt instructions to install the PHPExcel library ...and some whitespace fixes.
This patch adds the PHPExcel Feed output style option, in addition to the module's original XLS Feed output style.
This PHPExcel Feed output style produces .xls files that work for me in more than just MS Excel.
Comment #12
bernman commentedBefore diving into this myself, can you predict what issues would arise trying to apply this patch to the Drupal 7 version of the plugin?
Many thanks in advance.
Comment #13
ywarnier commentedHi Bernman,
The plugin is an output extension, so there pretty much no risk at all in adding it (maybe it will generate a few "not found errors" initially, but these should be easy to fix, and then it might not work, but this shouldn't affect the rest of your site).
Comment #14
creaoy commentedI think i will add an option to use phpexcel if module http://drupal.org/project/phpexcel enabled.
What do yo think?
Comment #15
creaoy commentedComment #16
ywarnier commentedI didn't know the phpexcel module. Apparently it also requires the download and installation in sites/all/libraries of th phpexcel library, so there's not much of a benefit to requiring it, but it's probably nicer to let them handle the dependency.
Comment #17
creaoy commentedOk. I will add this in my TODO list.
Comment #18
morbiD commentedIt seems like the only reason to use the phpexcel module is if you want to use the limited API that it provides.
Otherwise, I would have thought the libraries module would be a better option for managing the PHPExcel library and any other libraries you might wish to support, especially if you wanted to include more output control options in the views style plugin, such as options for cell width and text wrapping on columns or rows, which the phpexcel module's API doesn't appear to support.
In fact, it might be worth offloading the php-excel library as well, given the reasoning here: http://drupal.org/node/1342220#libraries-seperate, but that's a separate issue I guess.
Comment #19
igor.ro commentedI made this port
you can find code here
https://github.com/goruha/views_export_xls
branch 7.x-2.x
Could you merge it to drupal.org project?
Thanks.
Comment #20
dromansab commentedHi,
Thanks for your port. It works so good.
Can you tell me how I can define the height and width of cells? I would set an automatic height and width depending on the field content.
Thanks!