富文本内容以excel导出

时间:2015-07-20 11:36:04

标签: c# excel richtextbox export-to-excel

我有一个富文本内容到数据库

<p>
<strong>Hi This </strong><span style="text-decoration: underline;">is a sample
</span> 
exampe
<span style="text-decoration: underline;"> on how thing will be working</span>
<span style="text-decoration: line-through;">from here</span> 
<span style="text-decoration: underline;">on in the new project</span>
</p>  

从数据库中获取后,如何导出到excel以使输出看起来像  

    您好是一个示例           exampe      关于事情将如何运作     从这里      on in new project     

1 个答案:

答案 0 :(得分:0)

用记事本打开.rtf文件。

全部替换所有<p>

将所有</p>替换为;

另存为.csv

在Excel中打开