My customer has a need to provide download links for underlying data of Power BI Embedded report. The embedding worked is all worked fine on the public site page. We also provided the download links to download underlying data in CSV and JSON format. All worked fine but the download links did not work in IE11. After searching on web found this article which was so helpful and worked with no issues.
Download JSON data in CSV format Cross Browser Support -> https://ciphertrick.com/download-json-data-in-csv-format-cross-browser-support/
I will not repeat what is discussed in the above blog. However my need was to support JSON format file download as well. So I used the following code as shown in the blog.
IEwindow.document.execCommand(‘SaveAs’, true, fileName + “.json”);
The issue is that the file type .json was not liked by IE so it never saved this file. I am guessing something to do with the code as a JSON file. To save you the trouble please DO NOT use .json instead use something like this.
IEwindow.document.execCommand(‘SaveAs’, true, fileName + “.json.TXT“);
That line was OK for IE and it worked like a charm. I hope it is helpful to you.