回车换行导致操作失败
我在客户端应用程序中使用 ConvertCsvToXML 工具将数据发送到 Web 服务。 分隔符字段是逗号,但是 csv 文件中的最后一列导致了问题。
该名称中存在回车换行符,如何避免这种情况?
换行符是 - "
"
经过研究,我认为这意味着一个新行。
我尝试将其添加到分隔符字段中 -
XDocument doc = ConvertCsvToXML(csv, new[] { ",", "
" });
但这不起作用,也许它不起作用不允许多个分隔符,但我不知道该工具的参数。
非常感谢任何帮助。
I am using the ConvertCsvToXML tool in my client application to send data to a webservice.
The seperator field is a comma however the last column in csv file is causing a problem.
The name exists with a carriage return line feed in it, how do I avoid this?
The line feed is - "
"
which after research I believe means a new line.
I tried adding it into the seperator fields -
XDocument doc = ConvertCsvToXML(csv, new[] { ",", "
" });
However this does not work, perhaps it doesn't allow multiple seperators however I do not know the parameters of the tool.
Any help is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设 http://www.codeproject.com/KB/linq/ConvertCsvToXml.aspx (*为什么我们必须用谷歌搜索?)
也许你还需要
\r
Assuming http://www.codeproject.com/KB/linq/ConvertCsvToXml.aspx (*why do we have to google that?)
Perhaps you need
\r
as well