Question

I am inserted an href Link to open Excel Sheet(already existing in Server directory) in a JSP page. It is working perfectly fine in local eclipse browser but unable to open the sheet in InternetExplorer (client side). The snippet is as below.

<a href="C:\Sheet\SparesUsed.xls#Sheet1!A1"> This link will open the Excel Sheet </a>

Now, it is working perfectly fine in InternetExplorer 7 (client side) also, because I have used the server path in workspace of eclipse to store the excel sheet folder , the path is as follows Server path for File :C:\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Log‌​inExample\Sheet\SparesUsed.xls.

But when i open and try to edit the excel sheet , it is giving me error "Sparesused.xls is read only". To save a copy ,click ok, then give workbook new name in saveas dialog box". But I cannot allow the user to change the location of the file using saveas button because this same sheet would be used and open again & again using href link of jsp. i am using Tomcat6.0 version of server

Was it helpful?

Solution 2

Iam Using This Approach now.

  1. Iam using Server Path to save/store the Excel Sheet , which can be browsed anywhere from client side.

  2. <a href="Sheet/SparesUsed.xls#Sheet1!A1" target="_blank">DownLoad Excel Sheet </a>.
    

Thanks for Help.

OTHER TIPS

The snippet you posted is incomplete html code. If the anchor tag is closed properly, browsers will offer to download the file or open it with Excel. This very much depends on the browser and version used. "not working in IE" is a bit too broad, since there are several generations of Internet Explorer active out there that all behave differently in some situations.

IE does not "open" an Excel spreadsheet by default. If anything, it will push the file to load with Excel.

What do you expect to happen?

Browsers don't open Excel files. Some servers support Excel Web apps and you may be able to open the odd Excel file and it will display in the browser, and if you are lucky, you may even be able to change a text value or a number. But be aware that currently this is the exception.

As a general rule: a complex Excel file can not be opened and edited in just any browser of your choice.

Excel is a quite complex application and it cannot be expected that all of Excel's funcionality magically appears in your browser, just because you post a link to an Excel file.

If that is not what you expected to hear, please rephrase your question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top