by Jeff Eaton on October 15, 2012 // Short URL

Module Monday: Views Data Export

How to Export Drupal Site Data to XLS, DOC, TXT, CVS, and XML Files

Almost a year ago, Module Monday featured the Views Datasource module, a tool for exposing custom XML and JSON feeds from a Drupal site. It's a great tool, but what if you need something a bit more... human-readable? A .doc file, or a spreadsheet for example? That's where the similarly-named but differently-focused Views Data Export module comes in.

Screenshot of administration screen

Views Data Export provides a custom View display type optimized for producing downloadable files in a variety of formats. Need a Microsoft Excel file with a list of the latest 100 posts on your site? Looking for a Microsoft Word .doc file that collects the text of the site's top-rated articles? No problem. The module supports XLS, DOC, TXT, CVS, and XML exports with format-appropriate configure options for each one. In addition, it uses Drupal's batch processing system when it's asked to generate extremely large export files, rather than timing out or giving out-of-memory errors.

Screenshot of resulting change to site

Whether you're putting together reports, giving users an easy way to download product data sheets, or conducting a quick, ad-hoc audit of your site's content, Views Data Export is a handy tool to have around. Its batch processing support makes it more reliable on large sites, and its support for a variety of "day to day" file formats means you'll spend less time juggling your data and more time making use of it.

Jeff Eaton

Senior Drupal Architect

Want Jeff Eaton to speak at your event? Contact us with the details and we’ll be in touch soon.

Comments

Add Your Comment

BryanSD

Fantastic module

I think this is a great tool and I've used it extensively this past year for pulling content out of a Drupal site and sending it elsewhere. I'm really impressed with it's XML and XSL output.

Reply

korn3lius

Great module, I also use this

Great module, I also use this module for months, however, it will showed me white page when output a lot of data (>1000 case).

Reply

Steven Jones

Turn on batching

In the settings for the view you might just need to turn on 'batched export' which is off by default, this should stop the memory limit issues.

Reply

Chris Larson

time saving module

I just discovered this module last month, when a customer wanted a little more flexibility than I had time to program in Views. Once he had access to the data in Excel he could do the programming himself.

Great module!

Reply

Milena

Module is really amazing, but

Module is really amazing, but if you want to export huge amount of data from other database system (no-sql solution for example) it's pretty useless (it uses mysql queries in batch export).

Is there any solution which can do that kind of thing?

Reply

Steven Jones

Paged export

We are working on other ways to export large datasets other than the existing MySQL only solution. The most likely way we'll do it is to just 'page' through all the pages of the view exporting those to the file. This may not be as consistent with a dataset that changes frequently, but should be good enough for most people.

Reply

Nancy

XML

Thanks for the post. I have a different problem I used to use View xml module with drupal 6 but it is not for drupal 7.

The Views export data generate xml out put but it does not allow me to custom this out. e.g

My xml should looks like that

title 1

title 2

However, view export data generates this output instead:

title 1

omeka_taggings is the name of my database table I used to read data instead of nodes, bc my data in external database.

resulted bc in my title field, I create my label as
field name="title"

When I used Views xml I wasa able to create a schema then added to other schemas available (jason, Atom) then I was apple to add my root of my xml and subroots as I wish.

Any ideas what I can do with view data export!

Reply

Whatsupdrew

What about images and field collections

I really like this module. I used it to migrate a lot of information with Feeds. What I can't seem to figure out is how to properly render XML (or CSV) with field collections. It changes the field collections to HTML in the XML. I have an example on my site for "Other Administration" field collections.

Reply

Add Your Comment