2013-01-17 107 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

相關問題