Rich text format (with formatting tags) in Excel to unformatted text

后端 未结 4 1281
天涯浪人
天涯浪人 2020-12-10 20:32

I have approx. 12000 cells in excel containing RTF (including formatting tags). I need to parse them to get to the unformatted text.

This is the example of one of th

4条回答
  •  执念已碎
    2020-12-10 21:16

    Your post made it sound as if each RTF document was stored in a single Excell cell. If so, then

    Solution using .Net Framework RichTextBox control

    will convert the RTF in each cell to plain text in 2 lines of code (after a little system configuration to get the right .tlb file to allow reference to the .Net Framework). Put the cell value in rtfsample and

    Set miracle = New System_Windows_Forms.RichTextBox
    With miracle
        .RTF = rtfText
        PlainText = .TEXT
    End With
    

提交回复
热议问题