Link to home
Start Free TrialLog in
Avatar of Demosthenes
Demosthenes

asked on

jquery data to csv

I have this code to open data in Excel, in csv format, seems to work fine in Firefox, does not work in IE 9 or 10.  Is there anything that can be done  ?

        var uri = 'data:application/vnd.ms-excel,' + html;
        var downloadLink = document.createElement("a");
        downloadLink.href = uri;
        downloadLink.download = "Export.csv";
        document.body.appendChild(downloadLink);
        downloadLink.click();
        document.body.removeChild(downloadLink);

Open in new window

Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Hi,
sorry but I don't have working code at hand, but the main functionality could be found at the Angular UI GitHub repository:
https://github.com/angular-ui/ui-grid/issues/2312

Please scroll down to the last 3-4 comments.
HTH
Rainer
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Demosthenes
Demosthenes

ASKER

I copy pasted your code as is, and it works.