Reputation: 491
I am developing an Exam Software in which I have used Subscript and superscript. so I have to store the Questions in HTML in the Database, Now i want to write those questions with HTML tags to the word, I tried Using Apache POI Library, here is the sample text :
<html>
<head> </head>
<body><font face="Shruti"> MY QUESTION </font>
</body>
</html>
but when I am trying to write text in word Document using apache poi , it is showing the HTML tags
Upvotes: 2
Views: 14069
Reputation: 15863
You can add your HTML as an AltChunk, and have Word convert it to native docx content when the file is first opened.
If you need to convert to native docx content in Java, you can use docx4j-ImportXHTML
Disclosure: I manage that repo.
Upvotes: 2