如何使用友好名称格式化csv文件中的HYPERLINK以进行Excel导入(How to format HYPERLINK in csv

编程入门 行业动态 更新时间:2024-10-26 08:29:53
如何使用友好名称格式化csv文件中的HYPERLINK以进行Excel导入(How to format HYPERLINK in csv-file for Excel import using friendly name)

我有一个csv文件,看起来像这样:

value1;value2;=HYPERLINK("http://somelink";"linkdisplay");value3

当我将其导入Excel 2013时,csv将以分号分割,同时也会拆分链接和友好文本之间的超链接。 我试图将Windows上的List分隔符更改为逗号,这实际上也改变了超链接的要求,用逗号分隔友好文本,所以没有运气。 尝试添加如何在CSV格式的文件中编码超链接中提到的引号? 那对我不起作用。

有人为此得到了解决方案吗?

I have a csv-file that looks something like this:

value1;value2;=HYPERLINK("http://somelink";"linkdisplay");value3

When I import this to Excel 2013, the csv is split on semicolon, also splitting the hyperlink between the link and the friendly text. I have attempted to change List separator on Windows to comma, that actually also changed the requirements for the hyperlink to split the friendly text with a comma, so no luck there. Attempted to add quotes as mentioned in How to encode a hyperlink in CSV formatted file?, that did not work for me.

Someone got a solution for this?

最满意答案

对于文件:

String hyperlinks = "\"=HYPERLINK(\"\"file://" + DocumentDataType.strDirectoy + docName + "\"\",\"\""+ DocumentDataType.strDirectoy + docName+ "\"\")\"" + ",";

对于网站:

String hyperlinks_SourcePath = "\"=HYPERLINK(\"\"http://" +ipAddress+":"+portNumber+"/WorkplaceXT"+ "\"\",\"\""+sourcePathFinal+ "\"\")\"" + ",";

For file:

String hyperlinks = "\"=HYPERLINK(\"\"file://" + DocumentDataType.strDirectoy + docName + "\"\",\"\""+ DocumentDataType.strDirectoy + docName+ "\"\")\"" + ",";

For website:

String hyperlinks_SourcePath = "\"=HYPERLINK(\"\"http://" +ipAddress+":"+portNumber+"/WorkplaceXT"+ "\"\",\"\""+sourcePathFinal+ "\"\")\"" + ",";

更多推荐

hyperlink,csv,电脑培训,计算机培训,IT培训"/> <meta name="description&quo

本文发布于:2023-08-07 03:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1460706.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   友好   名称   文件   csv

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!