在Excel中将RTF(RTF格式)代码转换为纯文本格式

我将数据库查询导出为Excel,并获取具有RTF格式的行。

这里是Excel的截图

如何将这些字段转换为纯文本? 我find了很老的答案,所以我想知道有没有人知道一个方法。

另一种方法是使用Microsoft Rich Textbox Control(但不能在x64 Office上进行testing)

Sub rtfToText() With CreateObject("RICHTEXT.RichtextCtrl") ' or add reference to Microsoft Rich Textbox Control for early binding and With New RichTextLib.RichTextBox .SelStart = 0 ' needs to be selected .TextRTF = Join(Application.Transpose(Cells.CurrentRegion.Columns(1))) [C1] = .Text ' set the destination cell here ' or if you want them in separate cells: a = Split(.Text, vbNewLine) Range("C3").Resize(UBound(a) + 1) = Application.Transpose(a) End With End Sub