导出到excel时无法单击超链接 [英] Hyperlinks not Clickable when Exported to excel
问题描述
运行查询时,查询结果将导出到Excel.此数据有很少的超链接会随机显示(我不知道哪个单元格或列).
When I run a query, the results of it are exported to the Excel. This data has few hyperlinks which get displayed in random (I don't know which cell or column).
我的问题是,超链接正在显示为普通单词,而不是可单击的超链接.除非我单击特定的单元格,然后单击外部,否则超链接不会变为蓝色.我该如何解决这个问题?我希望将超链接作为可点击的超链接导出到excel.
My issue is that the hyperlinks are getting displayed as normal word and not as clickable hyperlinks. Unless, I click on the particular cell and click outside, the hyperlink doesn't become blue. How can I resolve this issue? I want the hyperlinks exported to excel as clickable hyperlinks.
推荐答案
在ms的excel和Apple的数字程序中有一个= HYPERLINK()公式. 两种方法可以应用此方法:
There is a =HYPERLINK() formula in ms's excel and apple's numbers programs. Two ways to apply this:
在源数据中,将该列的输出包装在公式中. 正如您未提供示例查询或提及语言一样.这是一个SQL示例:
In your source data, have that column's output wrapped in the formula. As you didn't give an example query or mention the language. here's a sql example:
选择products_id,products_name, concat("= HYPERLINK(\" http://www.site.com/product_info.php? products_id = ,products_id," \)"), products_description from product p;
select products_id, products_name, concat("=HYPERLINK(\"http://www.site.com/product_info.php?products_id=",products_id,"\")"), products_description from products p;
因此,结果excel/xml列将为= HYPERLINK(" http://www .site.com/product_info.php?products_id = 1223 ),当您在excel中打开文件时,该文件将可单击.
so the resulting excel/xml column will be =HYPERLINK("http://www.site.com/product_info.php?products_id=1223") and it will be clickable when you open the file in excel.
处理此问题的另一种方法是在excel中打开它之后: 假设链接在C列中.新建一个D列,在D2单元格中插入公式 = HYPERLINK(C2),然后按Enter键,单击单元格D2,复制,然后选择整个列D,粘贴.现在,您有一列可点击的链接.
The other way to handle this is after you open it in excel: Let's say the links are in column C. Make a new column D, in cell D2 insert the formula =HYPERLINK(C2) then press enter, click on cell D2, copy, then select the entire column D, paste. Now you have a column of clickable links.
-Z
这篇关于导出到excel时无法单击超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!