Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can anyone recommend a way to export a tablefield as csv?
Comment | File | Size | Author |
---|---|---|---|
#3 | tablefield_csv_export_1562146_3.patch | 5.48 KB | Kevin Hankens |
Comments
Comment #1
dthiessen CreditAttribution: dthiessen commentedYou 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?
Comment #2
Alpha5 CreditAttribution: Alpha5 commentedI 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.
Comment #3
Kevin Hankens CreditAttribution: Kevin Hankens commentedThis 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!
Comment #4
Kevin Hankens CreditAttribution: Kevin Hankens commentedComment #5
Kevin Hankens CreditAttribution: Kevin Hankens commentedSome 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.
Comment #6
Kevin Hankens CreditAttribution: Kevin Hankens commentedComment #7
Kevin Hankens CreditAttribution: Kevin Hankens commentedJust 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.
Comment #8
Kevin Hankens CreditAttribution: Kevin Hankens commentedI just rolled this into the 2.1 release. If there are any issues, please open a new ticket. Thanks!
Comment #9
sgtsaughter CreditAttribution: sgtsaughter commentedCan this feature be backported to the D6 branch?