Data URI used to export to CSV/Excel (no server-side request) : browser support/limitations?

StackOverflow https://stackoverflow.com/questions/8176859

  •  03-03-2021
  •  | 
  •  

Question

Following the questions:

and as suggested, I'm thinking about generating a CSV file content in the client and then use a Data URI to prompt an "open-in-Excel" action from the browser. After reading the limitations and different levels of support of this feature (Data URI) from browsers I'd like to know about first-hand experience of this technique and about things I've to take care of.

Thx.

Was it helpful?

Solution

I have not been able to reliably make it work in IE. You could use server side resources for IE and data urls for everything else, but if you are writing that server side code anyway, then in most cases it is probably better to use it universally.

I found a related question at:

Data URI scheme and Internet Explorer 9 Errors

If it absolutely must be done on the client side and usage of flash is acceptable, you could try something like:

http://datatables.net/extras/tabletools/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top