pserranor
asked on
Save a Excel file with
I want to download a Excel file, but the browser open the file and not show the dialog "SaveAs..."
I trying with the execCommand and IFRAMES but not work with "xls" files!
<iframe id="SaveFrame" SRC="MyFile.xls" style="display:show"></ifr ame>
<html>
<INPUT TYPE="button" STYLE="width: 9em" VALUE="HTML Mode" ONCLICK="SaveFrame.documen t.('SaveAs ',false,'w w.xls')">
</html>
I trying with the execCommand and IFRAMES but not work with "xls" files!
<iframe id="SaveFrame" SRC="MyFile.xls" style="display:show"></ifr
<html>
<INPUT TYPE="button" STYLE="width: 9em" VALUE="HTML Mode" ONCLICK="SaveFrame.documen
</html>
This is because Microsoft IE automatically detects the file as an Excel mime type. Microsoft has tightly integrated IE and Office products. There's no way around it.
If a user who tries to download the file has installed Microsoft Excel then it will load Excel. If the user has not installed Excel, it will start the download normally.
Can you use ASP? If so you can solve this server-side. If so, let me know.
Otherwise I'd probably .zip the file to force someone to download it.
Otherwise I'd probably .zip the file to force someone to download it.
ASKER
whammy
I can use ASP, how I do it?
I can use ASP, how I do it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks the example works!!
You're welcome. :)