excel 获取url图片
Last week on the Bacon Bits blog, Mike Alexander showed how to send an email with the HYPERLINK function in Excel, complete with subject line and message. Mike's article showed how versatile the HYPERLINK function can be, and you also learned about Mike's unique talent for poetry. Here's how to get the URL from an Excel Hyperlink.
上周,在培根比特斯(Bacon Bits)博客上,迈克·亚历山大(Mike Alexander)演示了如何在Excel中使用HYPERLINK功能发送电子邮件 ,并附带主题行和消息。 Mike的文章展示了HYPERLINK功能的通用性,并且您还了解了Mike独特的诗歌才能。 这是从Excel超链接获取URL的方法。
删除超链接 (Remove Hyperlinks)
If you inherit a workbook full of hyperlinks, and you want to change those, so they just contain text, you can copy the cells, and paste them as values, in another location. If you're using Excel 2010, you can quickly remove hyperlinks from selected cells. (Thanks to Sam for this tip.)
如果您继承了一个充满超链接的工作簿,并且想要更改它们,以便它们仅包含文本,则可以复制单元格并将它们作为值粘贴到另一个位置。 如果您使用的是Excel 2010,则可以快速从选定的单元格中删除超链接。 (感谢Sam提供的提示。)
- In Excel 2010, select cell(s) that contain hyperlinks 在Excel 2010中,选择包含超链接的单元格
- Right click on any selected cell 右键单击任何选定的单元格
- Click Remove hyperlinks 单击删除超链接
In any version, to remove hyperlinks in a group of selected cells, you can run a macro, like the one below. Copy this code into a regular module in your workbook, then select the cells, and run the delHyperlinks macro.
在任何版本中,要删除一组选定单元格中的超链接,您都可以运行一个宏,如下所示。 将此代码复制到工作簿中的常规模块中,然后选择单元格并运行delHyperlinks宏。
Sub delHyperlinks()
Selection.Hyperlinks.Delete
End Sub
You can also clear all the hyperlinks on the active worksheet (thanks Eric and Rick).
您还可以清除活动工作表上的所有超链接(感谢Eric和Rick)。
Sub RemoveHyperlinksOnActiveSheet()
'posted by Rick Rothstein
Cells.Hyperlinks.Delete
End Sub
从超链接中提取地址 (Extract Address from Hyperlink)
If you paste hyperlinks as values, what you're left with is the "Friendly Name." That's the text you can see in the cell with the hyperlink, like "Sales Report" in the screen shot below.
如果将超链接粘贴为值,则剩下的就是“友好名称”。 这是您在带有超链接的单元格中看到的文本,例如以下屏幕截图中的“销售报告”。
Instead of the Friendly Name, you might want to extract the hyperlink's location. There's no built-in function for that in Excel, but you can create your own, with a bit of VBA.
您可能要提取超链接的位置,而不是友好名称。 Excel中没有用于该功能的内置函数,但是您可以使用一些VBA创建自己的函数。
Copy the HLink code, shown below, into a regular module in your workbook.
将如下所示的HLink代码复制到工作簿的常规模块中。
Function HLink(rng As Range) As String
'extract URL from hyperlink
'posted by Rick Rothstein
If rng(1).Hyperlinks.Count Then HLink = rng.Hyperlinks(1).Address
End Function
Then, you can use the HLink function in that workbook, just like any other Excel function. For example, to find the address for a hyperlink in cell B3, use this formula: =HLink(B3)
然后,您可以在该工作簿中使用HLink函数,就像其他任何Excel函数一样。 例如,要在单元格B3中查找超链接的地址,请使用以下公式: = HLink(B3)
To extract the Friendly Name, use a simple link to the cell: =B3
要提取友好名称,请使用指向该单元格的简单链接: = B3
了解有关超链接的更多信息 (Learn More About Hyperlinks)
To learn more about adding and removing Hyperlinks, visit the Excel Hyperlinks and Hyperlink Function page on the Contextures website.
若要了解有关添加和删除超链接的更多信息,请访问Contextures网站上的“ Excel超链接和超链接功能”页。
There are written instructions, and videos, like this one.
这里有书面说明和视频。
翻译自: https://contexturesblog.com/archives/2010/12/13/get-the-url-from-an-excel-hyperlink/
excel 获取url图片