如何将HTML标记转换为格式化文本 [英] How to convert html tags to formatted text
本文介绍了如何将HTML标记转换为格式化文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在其中生成数据以表现出色,
如何转换"OL>
斜体
下划线
下划线
下标"
到
1 .italic
强调
上标
下标
解决方案
尝试以下链接,它以粗体,下划线,斜体格式显示数据.
C#中的Excel-Bold斜体下划线
可以在下面的C#中使用以下棘手的方法..ints.
var webBrowser = 新 WebBrowser(); webBrowser.CreateControl(); // 仅在需要时 webBrowser.DocumentText = *带有标记的html **; 同时(_webBrowser.DocumentText!= * yourhtmlstring *) Application.DoEvents(); webBrowser.Document.ExecCommand(" , false ,空); webBrowser.Document.ExecCommand(" , false ,空); * yourRichTextControl * .Paste();
hi,
i want to generate data to an excel in that,
how to convert html tags of "OL>
italic
underline
underline
subscript"
to
1.italic
underline
superscript
subscript
any solution?
解决方案
Try following link, It shows the data in Bold, Underline, Italic format.
Excel-Bold Italic Underline in c#
Can use below tricky method..ints in C# below..
var webBrowser = new WebBrowser(); webBrowser.CreateControl(); // only if needed webBrowser.DocumentText = *htmltext withtags*; while (_webBrowser.DocumentText != *yourhtmlstring*) Application.DoEvents(); webBrowser.Document.ExecCommand("SelectAll", false, null); webBrowser.Document.ExecCommand("Copy", false, null); *yourRichTextControl*.Paste();
这篇关于如何将HTML标记转换为格式化文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文