BlazorTable
BlazorTable copied to clipboard
Export datatable to Excel and/or CSV
This is a suggest feature, is it possible to add export to Excel and/or CSV feature? I think this is an essential feature to have for datagrid. Thanks for consideration.
I think the CSV export can be implemented very easily. See the following Issue which shows how to retrieve the Filtered Items, https://github.com/IvanJosipovic/BlazorTable/issues/118
I'll think about If I would like this functionality directly in BlazorTable.
@IvanJosipovic
Hey, I had a similar need for exporting to CSV, but I needed the rendered version of the data (like, if you have a custom template for a column).
I couldn't see any way to do this without actually putting all filtered items (ignoring pages) on the DOM in a hidden div, getting all of the rendered text with a JS interop, then finally saving it as a CSV. This puts some strain on the browser having to put everything on the DOM like that, but it works.
Do you know of a better way to do this? I don't know if there's a way to get the text from a RenderFragment without actually putting it on the DOM first, but this would help immensely and would cut down on in-browser memory usage as well.
I can show you my solution if you'd like as well.
@IvanJosipovic I'm having a client project where we need this feature, can we pay you to implement this instead of me having to do it outside BlazoredTable.?
Personally I don't think this feature should be a on pr default, but a option we can turn on, like a "download csv" button. It would solve the requirement, and would have a better feel than whatever I can implement.
We don't need excel support, just plain old csv.