How to export original data provided by json
How to export original data provided by json
I have a datatable with data provide via JSON.
I'm using button to allow user export their data. The problem is I'm using render to merge several data into 1 column. That cause issue when use try to export, data will be merged to 1 column on excel file.
I did search and see orthogonal option but base on example I see it not resolve my case as exported data still have data merged in 1 column.
Do you have any idea? Or I will need to create a button separated from datatable to do that? I still prefer using builtin datatable function as I also have print button so I don't want to separate those function to external code.
Thank you in advanced.
This question has an accepted answers - jump to answer
Answers
Yep, you could use orthogonal data for that. The way to go would be to use a hidden column for one of those fields - and when exporting, use the displayed one for one part, and the hidden one for the other. This example demonstrates that: http://live.datatables.net/jakobigu/1/edit
Colin
Thank Colin, got the idea. I will try it.