Convert word doc file to html
Get via App Store Read this post in our app!
How to convert HTML file to word? [closed]
I've got a requirement where I need to save HTML documents in memory as Word .DOC files.
Can anybody give me some links to both closed and open source libraries that I can use to do this?
Also, I should edit this question to add the language I'm using in order to narrow down the choices.
closed as off-topic by BatScream, Nate Barbettini, Simon MᶜKenzie, ivan_pozdeev, DeanOC Dec 4 '15 at 0:28
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – BatScream, Nate Barbettini, Simon MᶜKenzie, ivan_pozdeev, DeanOC
If the input or output format is not specified explicitly, pandoc will attempt to guess it from the extensions of the input and output filenames.
So you can even use
just past this on head of your php page. before any code on this should be the top code.
this will convert all html to MSWORD, now you can customize it according to your client requirement.
When doing this I found it easiest to:
- Visit the page in a web browser
- Save the page using the web browser with .htm extension (and maybe a folder with support files)
- Start Word and open the saved htmfile (Word will open it correctly)
- Make any edits if needed
- Select Save As and then choose the extension you would like doc, docx, etc.
A good option is to use an API like Docverter. Docverter will allow you to convert HTML to PDF or DOCX using an API.
Other Alternatives from just renaming the file to .doc.
Here is a good place to start. You can also try using this Office Open XML.