Can Excel interpret a cell as HTML?

前端 未结 4 947
小鲜肉
小鲜肉 2020-12-05 14:11

I\'m using Aspose.Cells to build an Excel document programmatically. This works great. One of the cells, though, is a block of raw HTML. I\'m wondering if it is possible to

4条回答
  •  星月不相逢
    2020-12-05 14:37

    Pasting html data in excel will result in the html being properly displayed in excel. The one issue with this is that carriage returns and tabs will be pasted to the next cell.

    Dim objData As New DataObject
    objData.SetText(sHTML)
    Clipboard.SetDataObject(objData)
    objRange.PasteSpecial()
    

    Will fill a cell with properly formated text

提交回复
热议问题