Hi Ben, I tryed it...but unable to do it. Please provide me a example to open Excel file in browser after clicking a link on a browser. This Excel will open in same browser or may be in other brower,my application need a to open excel fine in browser.
Are you working with pre-existing Excel files (.xls), that are already on your server or are you trying to display the results of a database query in Excel?
Joined: Jul 25, 2005
Yes Ben I am working with pre existing .xls file. For example:- There is a .xls file on my web server and when I click a link on webBrowser then that .xls should be display on my browser.I just want to display that pre-existing Excel file (which is there on wesServer hard drive)in my webBrowser after clicking a link in webbrowser. Suppose there a file name Laterel.xls on hard drive when a user click a link in browser then this file(Literel.xls) should be dispaly in browser. --------------
If you stream the file yourself (with a servlet) you can set whatever headers (Content-Type, Content-Disposition, ... ) you like. There was a recent thread in this or the servlet's forum that covered this, exact same issue.
Ben thanx a lot for your help. Still I need some help from you. Now I am able to open excel file in browser...further I need some help to optimised it. Now in that excel file I wan't to make some changes or I have to enter new values and that new entered value should be display in jsp file(browser).
Do you mean that you want to be able to edit an Excel sheet residing on a server? There is nothing in JSP for doing this. You would either need to save the Excel sheet to the local machine, then edit it and then upload it back to the server
or set up something that works over the Webdav protocol like Jakarta/Slide (which is way beyond the scope of a JSP forum),
or use a product like the jakarata/poi product which operates on MS Office files from Java objects.
subject: opening xls fine in web Browser using jsp