Save Base64 String as Excel.xls file using JavaScript in IE 7

I am trying to find a way to save a Base64 string in IE 7 using JavaScript as an Excel.xls file. It works fine in FireFox:

window.open ("data:application/vnd.ms-excel;base64," + bytestring, "", "width=300,height=300,resizable=1"); 

where bytestring is a Base64 string. However, this method does not work for IE 7.

After doing some internet research, it looks like IE 7 doesn't seem to be able to handle Base64 Strings. How can I achieve this? Should I use Base64 to UTF conversion to be able to do this?

What I'm trying to achieve is when the user clicks the button, the Save As dialog box appears, allowing the user to specify a file name and select a destination, and then save the Excel file.

I limited myself to using IE 7. Believe me, if I had the choice to use a different browser, I would definitely do it.

Thanks in advance for your help!

+4
source share
1 answer

This is not possible in IE7 without a server-side proxy. Either do this, or output an HTML table and ask the user to copy and paste it into Excel.

+1
source

All Articles