从CSV文件中读取行到文本文件,其中行包含特殊的字符和代码 [英] Reading lines from CSV file into text file where lines contains special caracters and code

查看:138
本文介绍了从CSV文件中读取行到文本文件,其中行包含特殊的字符和代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我有一个将旧版本导出到CSV文件的SharePoint网站。

因为我们有了一个新的系统。

我还是C#的新手,需要帮助,找到正确的方法来读取CSV文件中的行,并将内容保存到TXT文件中。 
要为每篇文章创建一个TXT文件。

I’m still new in C# and need at bit help, to find the correct way to read the lines from the CSV file, and save the contant into a TXT file.  A wan’t to create a TXT file for each article.

对我来说最大的问题是Sharepint中的文章是技术文档,包含特殊字符,包括丹麦文字和
编程代码。

如何以正确的方式做到这一点?

祝你好运

ThomasB

推荐答案

我认为他可能意味着他需要从内容中删除HTML标签,例如
这个,然后 转换所有"HTML编码文本"
恢复正常
HttpUtility.HtmlDecode()。
 但我可能错了。
I think he probably means he need to remove HTML tags from the content with something like this, and then convert all "HTML encoded text" back to normal one with HttpUtility.HtmlDecode(). But I could be wrong.


这篇关于从CSV文件中读取行到文本文件,其中行包含特殊的字符和代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆