none
Getting HTML text with in a table cell RRS feed

  • Question

  • Hi 

    I am using Open XML to read the values inside the cell. I am able to get the plain text inside the cell of a table using innerText property as shown below - 

         

    TableRow row = table.Elements<TableRow>().ElementAt(0);
    DocumentFormat.OpenXml.Wordprocessing.TableCell cell = row.Elements<DocumentFormat.OpenXml.Wordprocessing.TableCell>().ElementAt(1);

     String value = cell.InnerText;

    I would like to know how can I get directly rich text inside the cell using the open xml api.

    Thanks

    Prashant


    prashant

    Thursday, October 23, 2014 3:42 PM

All replies

  • Hi phkadse,

    As far as I know, there isn’t the API/Method to get the cell’s value as html. We need do it by ourself.

    We need to get ParagraphProperties and RunProperties, then get the detail properties, such as Color.

    There is a link that may benefit you:

    # Html to OpenXml

    https://html2openxml.codeplex.com/documentation

    Best Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 24, 2014 8:56 AM
    Moderator