How to use Views Excel Export or Views data export to export a filtered table? A while back I asked a question about how to pass a list of columns to display in a views table and a solution closest to what I wanted to do was a module:

Views Dynamic Fields

I was positively shocked that the description of the project mentioned the second part of what I need to do here. Export that view to an Excel spreadsheet.


  This module provides additional advantages when used with the Views Bonus Pack module or the Views Excel Export module to generate an xls file from a view. The xls file will only display the fields you have chosen on the rendered view instance in browser.


I need to let the user choose the columns, then render the view with those columns and expose filters for all chosen columns, apply them, then download the result in an excel file. Unfortunately I was not able to find  a description how do I actually do that. Using the xls feed option I don't get any fields from the view itself (seems like I need to add the fields manually again) which I can't imagine works with the filters from the view itself. Exporting the file works, but it only shows the default "Title" field (without adding fields to the feed manually).

I had the same problems with Views data export, creating a new data export started with a default "Title" field and I don't think you're supposed to add the same filters again.

Let me know if you have any experience with those modules or ever had to export a view to a spreadsheet.
I just used Views Data Export module for a Drupal 7 project.


Create a view with the configuration you require (exposed filters, etc.).
Add a new display to your view of the type "data export". (As you duplicate your display the filters should inherit, but otherwise, you just want the "main" view and the "data export" view configured the same.)
In the "Page Settings" of the "data export" view display, give it a unique path (This is true even for tabbed items like admin views linked in admin menus).
In the "Page Settings" of the "main" view display, attach the "data export" display (This will provide a little CSV link at the bottom of your view).
Under the "Format" settings for your view, make sure you select CSV. Then edit settings and check the box for "download as file" or whatever it is.


Now, clicking on that CSV icon that appears at the bottom of your view page/block will export a CSV file that will inherit the filtered table. Just ensure the exposed filters match in each display.