Excel超链接到具有id或命名锚点的网页位置

Excel超链接到具有id或命名锚点的网页位置

本文介绍了Excel超链接到具有id或命名锚点的网页位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Excel中,我可以创建一个超链接到一个网页。但是,如果URL包含#个字符,则Excel将始终将哈希符号转换为空格 - 连字符空间,以使链接不再起作用。 URL 成为

In Excel, I can create a hyperlink to a web page. However, if the URL contains a # character, Excel always converts the hash sign to space-hyphen-space so the link no longer works. The URL http://www.example.com/page#location becomes http://www.example.com/page%20-%20location

我已经尝试了三种方式


  1. 手动,右键单击一个单元格,单击超链接并在地址栏

  1. manually, right-click a cell, click "hyperlink" and type the URL in the address box

中输入URL,提供完整的网址:

programatically, providing the full URL:

工作表(1).Hyperlinks.Add地址:=http://www.example.com/page#location

以程序方式,将该位置设为子地址:

programatically, giving the location as a "subaddress":

工作表(1).Hyperlinks.Add地址:=http ://www.example.com/page,SubAddress:=location



All three give the same problem. Is it possible to create a link to a specific location (id or named anchor) not just to a web page? I would be grateful for any help.

注意:代码示例不完整;为了清楚起见,我省略了参数Anchor和TextToDisplay。

Note: the code examples are incomplete; for clarity, I have omitted the parameters Anchor and TextToDisplay.

Excel版本:2010(14.0.6126.5003)SP1

Excel version: 2010 (14.0.6126.5003) SP1

推荐答案

这似乎是一个浏览器问题,而不是Excel问题。从Google Chrome切换到Internet Explorer解决了它。

It appears to be a browser problem not an Excel problem. Switching from Google Chrome to Internet Explorer solved it.

感谢大家的建议...只是说你没有发现同样的问题是什么促使我看其他地方。

Thanks everyone for your suggestions ... just saying that you didn't find the same problem was what prompted me to look elsewhere.

这篇关于Excel超链接到具有id或命名锚点的网页位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 17:06