This patch adds 'Export to CSV' and 'Export to DOC' links to table views. The links are at the top and bottom of the table, and when clicked they return either a CSV (comma separated values) file, or a 'word' file.

The CSV file can be opened in just about any spreadsheet, and the word file will open in ms word or openoffice, and probably others. The word file is actually nothing more than an html table with an 'application/msword' header, but it works.

This patch assumes that this patch has been applied, but that patch is broken, so I'll try to keep the two in sync.

Comments

wrunt’s picture

StatusFileSize
new6.13 KB

This takes into account the fixes in the other patch. The other patch still needs to be applied before this one.

merlinofchaos’s picture

I think this kind of thing is more appropriate using a small module that utilizes feed selector and a CSV plugin, rather than actually embedding this into views itself.

monjohn’s picture

+1 on developing this as a small module. I can see using this to print mailing labels using views and location data.

wrunt’s picture

It's on my todo list. I'll take a look at the feed selector of which merlinofchaos speaks.

merlinofchaos’s picture

If you haven't already, look at views_rss.module for a model.

You may not want to put it in the global feed selector (not sure you want to basically give all views that offer a feed a CSV view) but then again, you might. Either way, it should be easy to customize views_rss into views_cvs.module

merlinofchaos’s picture

Status: Needs review » Closed (won't fix)