File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening xls file in html

 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic