This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Opening xls file in html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Opening xls file in html" Watch "Opening xls file in html" New topic
Author

Opening xls file in html

Rizwan Mohammad
Ranch Hand

Joined: Sep 02, 2005
Posts: 445
How do I open excel file in browser? On click of link I need to open the excel file alone separately. But xls file is opening in browser window.


It opens in new window but it has all browser status bar etc.. on top..It is embedded within browser. Cannot I open without embedding it in browser window? Thanks in advance!


Rizwan
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The browser will open files if it knows how to do it. There is no way to specify that it should be opened up in Excel.

Eric
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you control how the file is streamed to the browser, you can set the Context-Disposition header with "attachment" instead of the "inline" header.

There is some example JSP code that does this in the JSP FAQ, see JspAndExcel.
[ April 10, 2007: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Opening xls file in html