You can open an Excel 97 file to a named area, or any sheet and cell from a anchor link or script in an HTML page as long as the HTML page is accessed via http ( not by double-clicking it in Windows Explorer, nor using file://) and Excel is opened within the browser. If Excel is opened outside of the browser, it will not move to the specified link.
This HTML demonstrates how the links and Jscript look:
<Title>Excel Linking Example</Title>
This link will open the Excel file to the second page with the focus on
This link will set the focus on a named area of the spreadsheet
onclick='location.href = "asheet.xls#TableName"'>
- The names linked to are not case-sensitive.
- If the link is specified with a file:// type URL, there will be an error. In this circumstance, the whole link is treated like the file name.
- A fully qualified URL is not necessary; that is, you can use href="linkpage2.xls#TableName" as long as the browser, or frameset was loaded using http:// rather than file://.
- In a frameset scenario, you can link to different parts of the Excel file, from the other frame, without causing a reload. This is interesting because normal security does not allow you to directly access the Excel object in the browser.
- Although you can link to an Excel 95 file, you cannot navigate through it in this method.
- When you reference a sheet name that includes a space, you must enclose the sheet name in single quotation marks (for example, <a href="asheet.xls#'Sheet Two'!D4">). If you do not do this, you may receive the following error message when you click the hyperlink in the Web page:Reference is not valid
Article ID: 197922 - Last Review: Jul 2, 2004 - Revision: 1