在 SXSSF 工作簿中使用 Apache POI 3.8-beta4 创建超链接时出现问题
使用 POI SXSSF 实现时,似乎无法正确创建超链接单元。我已从如何创建超链接指南中获取了示例代码的精确副本,并将工作簿更改为 SXSSF 而不是 XSSF,并且超链接不再起作用。
有其他人看到过这个问题或发现了解决方法吗?
谢谢,
马克。
It appears that hyperlink cells are not created correctly when using the POI SXSSF implementation. I have taken an exact copy of the example code from the HOW-TO guide for creating hyperlinks and changed the workbook to be SXSSF instead of XSSF, and the hyperlinks no longer function.
Has anyone else seen this problem or discovered a workaround?
Thanks,
Mark.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SXSSF 相当新,目前仅针对某些任务。如果可以的话,我建议您看看 XSSF 是如何做到的,并提交补丁!
同时,您可能可以使用 HYPERLINK 函数 相反。将单元格设置为公式单元格,并将公式设置为类似
HYPERLINK('http://stackoverflow.com/','Stack Overflow')
的内容,它将显示为链接Excel更新: 添加了对 SXSSF 的支持,以支持 r1145629 中的超链接
SXSSF is quite new, and currently aimed at only certain tasks. If you can, I'd advise you to look at how XSSF does it, and submit a patch!
In the mean time, you can probably get away with using the HYPERLINK function instead. Set your cell to be a formula cell, and set the Formula to be something like
HYPERLINK('http://stackoverflow.com/','Stack Overflow')
and it'll show as a link in ExcelUpdate: Support was added to SXSSF to support hyperlinks in r1145629
我知道这是一篇旧帖子,但当我对同一主题进行搜索时,它反复出现。
我正在使用 POI 3.9X,它确实可以使用超链接,但是如果您使用带有超链接的大量行,则会有一个很大的缺点。
对于根据上一示例看到“0”的用户,请确保在超链接 Excel 函数之前包含“=”
I know this is an old post, but it came up repeatedly while I was doing searches on the same subject.
I'm using POI 3.9X and it does work with hyperlinks, however there is a big downside if you are using really large amounts of rows with a hyperlink.
For those that see a "0" based on the previous example, make sure to include the "=" before the Hyperlink Excel function