2013-01-17 71 views
2

请帮助任何在C#中使用OpenOffice Writer文档的人。如何将HTML格式的文本插入到文档中?下面的代码:将html文本插入到带有C#的.odt OpenOffice文档中#

((unoidl.com.sun.star.text.XTextDocument)xComponent).getText().getStart(). 
    setString("The <b>first line </b> in the newly created text document.\n\n"); 

刀片究竟The <b>first line </b> in the newly created text document.

我需要插入“新建文本文档中的第一线

任何解决方案?

+0

你找到答案吗? –

回答

0

如果你想插入格式化文本 - 那么你需要改变(段落/字符)属性。

正如你所看到的,OOo对HTML标签没有反应;-)

+0

可以显示一些示例或链接,可以找到说明 –

+0

我没有这个C#。 我学习StarBasic的主要来源是Andrew Pitonyak(http://www.pitonyak.org/oo.php) – ngulam

相关问题