Hello, I have a trouble, I'm using DataTable's plugin to export a table to Excel, but I need that the users can open the exported table without save it...
So basically what you are looking for is for when the click occurs to save the file, rather than saving it, open it in Excel?
This unfortunately isn't possible since the XLS export is dependant upon Flash, and currently (at least as far as I am aware) there is no option in Flash to open a native application.
There are two options which might be possible, but each with drawbacks:
1. Use a server-side process to create the XLS and download it on the button click - this would present the browser's Save / Open / Cancel dialogue box, giving the user the option.
2. You could use the data:// pseudo protocol to create the same effect, entirely client side, but this won't work in older version of IE.
Also with either option there would be a little bit of work involved.
There is the download plug-in for TableTools which would help with option 1: http://datatables.net/extras/tabletools/plug-ins#download . If you'd like me to create a full working example for it, feel free to hit the "Support" link at the top of the page.
Replies
This unfortunately isn't possible since the XLS export is dependant upon Flash, and currently (at least as far as I am aware) there is no option in Flash to open a native application.
There are two options which might be possible, but each with drawbacks:
1. Use a server-side process to create the XLS and download it on the button click - this would present the browser's Save / Open / Cancel dialogue box, giving the user the option.
2. You could use the data:// pseudo protocol to create the same effect, entirely client side, but this won't work in older version of IE.
Also with either option there would be a little bit of work involved.
Sorry I don't have better news.
Allan
Thank's
Alexander
There is the download plug-in for TableTools which would help with option 1: http://datatables.net/extras/tabletools/plug-ins#download . If you'd like me to create a full working example for it, feel free to hit the "Support" link at the top of the page.
Allan
"this.s.dt.oApi._fnAjaxParameters is not a function"
Could you help me?
Thank's
Alex
Allan