简体   繁体   English

Excel PDF转换-超链接公式不可单击

[英]Excel PDF conversion - hyperlink formula is not clickable

How can I get the Excel hyperlink formula to result in clickable links when spreadsheets are saved as PDFs? 将电子表格另存为PDF时,如何获得Excel超链接公式以产生可单击的链接?

I have a simple spreadsheet with links to websites which I need to convert to PDF with clickable hyperlinks. 我有一个简单的电子表格,带有指向网站的链接,我需要使用可单击的超链接将其转换为PDF。 If I manually add links through the Insert Hyperlink menu the links are clickable in the resulting PDF. 如果我通过“插入超链接”菜单手动添加链接,则可以在生成的PDF中单击链接。 However, when I use the hyperlink formula as below with the same link, it works in Excel but NOT when I save the file to PDF (either by printing to PDF or converting it with the Acrobat toolbar). 但是,当我使用以下带有相同链接的超链接公式时,该公式在Excel中有效,但是当我将文件保存为PDF时(通过打印为PDF或使用Acrobat工具栏将其转换)时,该方法无效。

=hyperlink(A1,B1)

Where A1 has the link location (for example http://www.zillow.com ) and B1 has the friendly name. 其中A1具有链接位置(例如http://www.zillow.com ),而B1具有友好名称。

I realize I could add links with the Insert Hyperlink menu, but I have a column of them and the hyperlink formula would be a better option. 我意识到可以使用“插入超链接”菜单添加链接,但是我有一列,并且超链接公式将是一个更好的选择。 If it matters, I am using Excel 2010 and Adobe Acrobat XI Pro. 如果有问题,我正在使用Excel 2010和Adobe Acrobat XI Pro。

I'm not sure how comfortable you are with VBA, but here is an example of what Scott was getting at. 我不确定您对VBA的感觉如何,但这是Scott的例子。

This starts in a cell that you selected, and places a hyperlink in that cell with the hyperlink equal to whats in column A, and the text equal to what's in column B. It continues to do this until the data in column A ends (until it hits a blank space). 这从您选择的单元格开始,并在该单元格中放置一个超链接,该超链接等于A列中的内容,文本等于B列中的内容。它将继续执行此操作,直到A列中的数据结束(直到它击中了空白)。

Sub HLink()

    Temp = Cells(Selection.Row, 1).Text
    While Not Len(Temp) = 0
        ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=Temp, TextToDisplay:=Cells(Selection.Row, 2).Text
        Selection.Offset(1).Select: Temp = Cells(Selection.Row, 1).Text
    Wend

End Sub

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM