Nothing happens when clicking a hyperlink in an Excel Web page

Symptoms

A workbook contains a hyperlink to a blank worksheet in the same workbook in Microsoft Excel. When you save the workbook as a Web page and then view it in a Web browser, nothing happens when you click the hyperlink.

Cause

This problem occurs when the following conditions are true:
  • Only one worksheet in the workbook contains data.
  • The hyperlink points to a blank worksheet.
  • You save the entire workbook as a Web page.
This behavior occurs because when you save a workbook as a Web page, Excel doesn't save blank worksheets if the workbook contains only one worksheet with data. This allows Excel to write out a single HTML file, thereby conserving disk space.

Workaround

To work around this behavior, enter some text on the worksheet that is the target of the hyperlink. Then, when you save the workbook as a Web page, Excel will create an HTML file to represent the worksheet that is the target of the hyperlink.

More Information

When you save a workbook as HTML, Excel may break the file down into separate component files. If only a single worksheet in the workbook contains data, Excel saves the workbook as a single file (Book1.htm, for example).

However, if multiple worksheets in the workbook contain data, Excel uses frames to display the worksheets in a browser. Excel saves the frameset file with the path and file name that you specify in the Save As dialog box. It saves the worksheets as separate HTML files in a folder with the same name as the frameset file, as follows in this example:
  • Book1.htm (frameset file)
  • Book1_files (folder)
    • Filelist.xml
    • Sheet001.htm
    • Sheet002.htm
    • Sheet003.htm
    • Stylesheet.css
    • Tabstrip.htm
Propriétés

ID d'article : 221064 - Dernière mise à jour : 27 mars 2007 - Révision : 1

Commentaires