开发者

Carriage return line feed causing operation to fail

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开发者_JAVA技巧't allow multiple seperators however I do not know the parameters of the tool.

Any help is much appreciated.


Assuming http://www.codeproject.com/KB/linq/ConvertCsvToXml.aspx (*why do we have to google that?)

XDocument doc = ConvertCsvToXML(csv, new[] { ",", "\n" });

Perhaps you need \r as well

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜