Export HTML content to word document in ASP.Net

Last Reply 3 months ago By dharmendr

Posted 3 months ago

 

<li style="font-family: Times New Roman;"><p style="font-family: Times New Roman;">for testing&nbsp;<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAPCAYAAAB6Iuj1AAACrUlEQVRYCe1XPc8pQRQ+bm7Jq6AgOqKVEP6Aj45So6BSiFKjQ6JQIFGodFololUoFBKJRkTofNQoFJK9eSZ33ix22Z2XvI2TbGZnduY85zznwyBJUKrVqkREktPplLbbraAW8WO/if8I+w8JyHQ6JbPZTJIkUaPRoHw+L6BF/Mhv4j/D/iviltfrJTxcPB4Pf33JCKMjkQgL2mg0IrvdfqX33fhXYDeTp9jiRSexUk+n09LxePyJmruzu91OKhaLUjKZvPsmX0CreQe+HEPtXQ0bZSskIBHO6Omf3W73KUncGJCJ/Woigq+mS+/6I+ynPTSVSpHBYKBer0elUol2ux0rgkKhQJlM5q4cbypEaHo6neh8PpPD4aBarUbhcJiwJpd34stxgA//XS6XJt9VCUUfs1qtFI/H2Y9Pp9Oh9XrNCAS59XqdfD4fAwPpr5TlcsnUlctlNoLYbDb7DaEVH8EHESBE7QFhSsLP4tvxeCS/30/7/Z4l1kPf1dIdJYfrAZfbOV/XM2oteezDlYyXPMZQKPTyXv3IdlF/FTMU2TkejykYDLLg8RLkc6WIKq3xKPPsiMVi1G63r7JFKUMWiwUlk0mKRqNMLebIUqPRqATz8jX4P5/PKZFI6NatSOhms6HL5UI2m40pHA6HNJlMvudaUXDdWa1WrGXgztrtdhlReOdPLpe7UofgDQYD1mr4h9lsRiJXs9uA8sDKR6WAwv+vry8ymUzcBM2j4j0U2WCxWJgSGNVsNlkPEQHQbMn/jehXh8OBZSSWeLZUKhW9qli/R0D1CvyHDbAFVcF7utvtfq5KqY/gWoCexf9atlot9o45eouoaOmhvH8Ci+PruZqJ2iY/J/cfNgQCAanf78u3qL4b8OU57Z8dWhlQ7KFaD3/23TPwIfSekx+t/AMRvghgDiVGpQAAAABJRU5ErkJggg==">&nbsp;purpose</p></li>

 above code is my html content.i have to write above content to word. how i will parse the content


Posted 3 months ago

it doesnt work for me


Posted 3 months ago

First you need to save the html string as html file then refer below article to write in word file.

https://stackoverflow.com/questions/18230043/create-word-document-with-html-content-in-c-sharp