Can anyone recommend a way to export a tablefield as csv?

Comments

dthiessen’s picture

You should just be able to copy and paste the table from the page directly into a spreadsheet or write some kind of scraper. Why do you need to export the data?

Alpha5’s picture

I need a way to automatic export table to a csv, so I can use it to do something else.
Or some way to get table data to use in php code.

kevin hankens’s picture

StatusFileSize
new5.48 KB

This is a very good feature request and something I've been wanting to do for a while... and luckily found some free time this morning :)

I just committed the new feature to the 7.x-2.x branch, but feel free to try the attached patch against the 7.x-2.0 release if that's easier.

I haven't done much testing, but it works as expected locally. Please help testing and let me know if you run into any issues!

kevin hankens’s picture

Status: Active » Needs review
kevin hankens’s picture

Some side notes:
- There is a new table setting to allow users to export via CSV. There is also a user-level permission for the same. You will have to have both of those enabled in order for this to work.
- There are menu and theme changes, so you'll need a full cache clear for things to start working.

kevin hankens’s picture

Component: Documentation » Code
Assigned: Unassigned » kevin hankens
Category: task » feature
Priority: Normal » Major
kevin hankens’s picture

Just fixed a bug where the export was not properly loading data for field deltas higher than 0. That's not included in the patch above, but I committed it to 7.x-2.x. Please let me know if you need a new patch to test locally as opposed to doing a git checkout.

kevin hankens’s picture

Status: Needs review » Closed (fixed)

I just rolled this into the 2.1 release. If there are any issues, please open a new ticket. Thanks!

sgtsaughter’s picture

Can this feature be backported to the D6 branch?