?
Solved

Save a Excel  file with

Posted on 2003-02-28
7
Medium Priority
?
588 Views
Last Modified: 2007-12-19
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"></iframe>

<html>
<INPUT TYPE="button" STYLE="width: 9em" VALUE="HTML Mode" ONCLICK="SaveFrame.document.('SaveAs',false,'ww.xls')">

</html>
0
Comment
Question by:pserranor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:tpatten
ID: 8046260
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.
0
 
LVL 1

Expert Comment

by:spiritwithin
ID: 8046320
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.
0
 
LVL 4

Expert Comment

by:whammy
ID: 8049850
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.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:pserranor
ID: 8057816
whammy
I can use ASP, how I do it?
0
 
LVL 4

Accepted Solution

by:
whammy earned 150 total points
ID: 8058011
http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20124498.html

Check out the accepted answer, it has an example link.

Also, I used this sample code with VERY little modification and it works just fine for me:

http://www.asp101.com/articles/jason/filedownloadlist/default.asp

Hope this helps!
0
 

Author Comment

by:pserranor
ID: 8060242
Thanks the example works!!
0
 
LVL 4

Expert Comment

by:whammy
ID: 8060294
You're welcome. :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question