1

I have a view that extracts user informations. Now I need to export these results in XLS format. I have tried "views data export", but it is not supported in last Excel versions.

Is there some way that permits me to export data in XLS for the new Excel versions ? Or a good library to use via a custom module ? I'm a senior developer so I have no problem to use PHP and other features.

  • 1
    Why not supported? A CSV is can be read by all versions of Excel including the latest and greatest. I do this almost daily. – Brady Feb 25 '16 at 17:11
  • Agreed that CSV is a fairly universal solution, and I have used it extensively. However, because of the way Excel can mishandle Unicode in a CSV, using a proper XLS or XLSX format has advantages. – mpdonadio Feb 25 '16 at 18:03
2

The Views Data Export PHPExcel should suffice:

This module extends Views Data Export module to allow XLSX files export.

That format is supported by Office 2007 and up.

Or go with what Brady said in comments and use CSV, it should be just as good.

1

To export views content in XLS format, you have to use Views Excel Export. This will export data in xls format.

  • That module has not been updated in almost three years. I would consider it not maintained. – Brady Feb 25 '16 at 17:12
  • The excel format hasn't changed in a long time @Brady, makes sense that the module wouldn't have been updated if it already worked without issue (don't know if it did, just saying don't rule out using a module solely based on the last release date, it might not mean anything) – Clive Feb 25 '16 at 17:43
  • Actually that last comment doesn't make a lot of sense in context, do ignore it :) @Pankaj - the OP's problem is being unable to open XLS; presumably they're using Office365 whose in-browser viewer can't support clunky old formats like that – Clive Feb 25 '16 at 17:56
  • True, but I also based that on the fact that Views has changed a lot in the last three years and this module hasn't shown any signs of updating appropriately. And it is also marked as minimally maintained. – Brady Feb 25 '16 at 21:38
  • That module works, and Excel (on PC) open the XLS file that views_data_export module produce. Or: the Execl program on client's machine open it. And this is enough for me. Thanks however for all. – ZioBudda Feb 25 '16 at 23:32
1

Another approach is to use the Forena module, and leave the choice to your website user about the desired output format (CSV, XLS, XML, etc).

Have a look at the Simple Table of States example, and think of it as the equivalent of your "view to extract user informations". And note the hyperlinks in the upper right, which are:

Try any of these links to get the equivalent of the extracted information, but in the format you requested (there or other supported formats such as PDF, DOC, JSON, etc).

Checkout Forena's Community Documentation for (way) more details, and/or the documentation that comes with the module.

Disclosure: I'm a co-maintainer of Forena.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.