1

出于某种原因,我需要从计算表中的单元格中检索“html 格式的文本”。我试过:

Sub Main
    Osheet = ThisComponent.Sheets.getByName("mySheet")
    oCell = oSheet.getCellrangeByName("D2")
    Print oCell.htmlText REM there is no htmltext property in cell instance
    REM holp output some thing like <p color="#ff0000">text in cell</p>
End Sub

有可能做到这一点吗?

- - - - - -更新 - - - - - - -

在此处输入图像描述

如上图所示。我在单元格中更改颜色和字体大小。然后我需要使用 VBA 从单元格中检索“html 文本”。如果可能的话它应该输出:

<font size='12'>Hi !<font color='#ff0000'>every</font><font size='16'>body</font>.<font color='#0000ff'>Are</font> you OK?</font></font>

如何用 VBA 实现这个功能?

4

0 回答 0