Oftentimes, we may need to export huge amounts of data from views into files so that it can be used for analysis or administration by non-technical or technical users. Instead of creating a custom module for this, we can leverage the Views Data Export module.

The Views data export module was designed to provide a way to export a large amount of data from views. It also provides a plugin for progressive batch operations, which will improve your website’s performance.

This article was originally published in 2021, and revised in Sep 2025 to ensure the information is current and accurate.

When would you need the Views Data Export Module?

You would use the Views Data Export module for Drupal 10 if you want to:

  • Migrate content for different Drupal instances using the migrate tools.
  • Perform a feeds migration, which lets you migrate content with little to no coding. However, if you use the Migrate tools, you’ll need a custom module with migration scripts tailored to your business logic.
  • Generate reports using site data to analyze day-to-day interactions with the website.

Installing the module

It would be best to download the Views Data Export module using Composer since the module has a dependency on the CSV Serialization module and other libraries. When you use Composer for the installation, the dependencies will be automatically handled.

$ composer require drupal/views_data_export

Demo Drupal

Next, install the module as you would install any contributed module. The quickest way is to use the Drush command-line tool to install the module.

$ drush en -y views_data_export

This will install all the required dependent modules.

Let’s set it up

After enabling the module, in order to export the views we will first need to create the views and set up the export display with the necessary configurations. Check the detailed explanations for each step that you can follow:

1. Create the Views 

Create a master views display according to the requirements, with the necessary fields and filters as needed. In our case, we have created the views for listing all the users on the site. Check the image below for reference.

Users Export

2. Create the Export display 

After enabling the module, we will have an additional button to add the Data Export display in the +Add Attachment dropdown. Using this, add the display as a data export. It will create the new data export display by copying all the fields and filters from the master display.

Add Data Export

3. Data export display configurations 

Export display has various configurations that will help in creating the data export of the views in various formats. See the image below that displays all the configurations.

Data Export

4. Display the download button 

Once all the setup is done, save the view and visit the page. Now you will be able to see the download button in the footer region of the views. This will download the data export with all the necessary filters if applied. 

CSV Users download

Final thoughts

With Drupal's list of growing modules, there always seems to be a module for that!

The Views Data export module for Drupal is one such module that is a very handy tool when you want to migrate your views results into CSV, JSON, or XML formats. Thus saving you time and effort in writing custom code. Want to discuss with our Drupal experts about a new project that we could help you with? We’d love to hear from you!

Contact us

LET'S DISCUSS YOUR IDEAS. 
WE'D LOVE TO HEAR FROM YOU.

CONTACT US SUBMIT RFP