导出到 Excel 时超链接不可点击

发布于 2024-08-10 10:19:45 字数 175 浏览 2 评论 0原文

当我运行查询时,其结果将导出到 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).

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听不够的曲调 2024-08-17 10:19:45

ms的excel和apple的数字程序中有=HYPERLINK()公式。
有两种应用方法:

在源数据中,将该列的输出包含在公式中。
因为您没有给出示例查询或提及语言。这是一个 sql 示例:

选择产品 ID、产品名称、
concat("=HYPERLINK(\"http://www.site.com/product_info.php? products_id=",products_id,"\")"),
产品 p 中的产品描述;

因此生成的 excel/xml 列将为 =HYPERLINK("http://www.site. com/product_info.php?products_id=1223"),当您在 Excel 中打开该文件时,它将是可点击的。

另一种处理方法是在 Excel 中打开它后:
假设链接位于 C 列中。创建一个新列 D,在单元格 D2 中插入公式
=HYPERLINK(C2) 然后按回车键,单击D2单元格,复制,然后选择整个D列,粘贴。现在您有一列可点击的链接。

-Z

There is a =HYPERLINK() formula in ms's excel and apple's numbers programs.
Two ways to apply this:

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:

select products_id, products_name,
concat("=HYPERLINK(\"http://www.site.com/product_info.php?products_id=",products_id,"\")"),
products_description from products p;

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.

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

烟─花易冷 2024-08-17 10:19:45

一种方法是在像GridView控件这样的网格中显示查询结果,然后导出网格。这将导致底层 HTML 也被导出(即 GridView HTML 和 GridView 内的所有控件)。

之后,当您打开 Excel 文件时,您将看到完整的链接。这是一篇讨论将 GridView 导出到 Excel 的文章。

http://www.highoncoding.com/Articles/197_Extective_Study_of_GridView_Export_to_Excel.aspx

One of the ways is to show the result of the query in a grid like GridView control and then export the Grid. This will causes the underlying HTML to get exported as well (i.e GridView HTML and all the controls inside the GridView).

After that when you open the Excel file you will see the links intact. Here is an article which talks about exporting GridView to excel.

http://www.highoncoding.com/Articles/197_Extensive_Study_of_GridView_Export_to_Excel.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文