Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export table as CSV, Excel, etc #419

Closed
brianmay opened this issue Feb 17, 2017 · 6 comments
Closed

Export table as CSV, Excel, etc #419

brianmay opened this issue Feb 17, 2017 · 6 comments
Assignees
Labels

Comments

@brianmay
Copy link
Contributor

Would be really good if it was possible to export tables in different non HTML formats.

I see https://github.com/goinnn/django-tables2-reports which looks like it has similar goals, unfortunately it looks like this project has been abandoned (no updates since October 2014).

@brianmay
Copy link
Contributor Author

Hmmm. Just found the as_values() function. Will give it a try. http://django-tables2.readthedocs.io/en/latest/pages/api-reference.html#django_tables2.tables.Table.as_values

@brianmay
Copy link
Contributor Author

Looks like as_values() returns the unicode dash (—) to indicate there is no value. Would be better if it returned something else instead, maybe None.

@jieter
Copy link
Owner

jieter commented Feb 17, 2017

Fair point!

@jieter jieter added the bug label Feb 17, 2017
@jieter jieter self-assigned this Feb 17, 2017
@jieter jieter closed this as completed in 3b23504 Feb 24, 2017
@jieter
Copy link
Owner

jieter commented Feb 24, 2017

@brianmay, just pushed a fix for this to master, please have look if it fixes your issue.

@brianmay
Copy link
Contributor Author

I am not able to test it right now (having been reassigned to another project), however the change - and the corresponding test case - looks good. Thanks.

jieter added a commit that referenced this issue Feb 27, 2017
intiocean pushed a commit to intiocean/django-tables2 that referenced this issue Feb 27, 2017
intiocean pushed a commit to intiocean/django-tables2 that referenced this issue Feb 27, 2017
@jieter
Copy link
Owner

jieter commented Feb 27, 2017

released 1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants