简体   繁体   English

将MS Word内容转换为HTML

[英]Convert MS Word Content to HTML

I need to make an upload tool where in the Word document will be converted to HTML format for saving to database. 我需要制作一个上传工具,将Word文档中的文件转换为HTML格式以保存到数据库。 Any idea? 任何想法?

I've written one (see the Doc to HTML Converter ). 我已经写了一篇(请参阅Doc to HTML Converter )。

To implement it, I downloaded the PIAs for Word, which let me open a document using Word, and control the format in which Word then re-saves the document. 为了实现它,我下载了Word的PIA ,它使我可以使用Word打开文档,并控制Word的格式,然后重新保存该文档。

Alternatively (instead of doing it yourself) there are tools like mine (and others, more famous) which you can use (some of which don't even use Word). 另外,您也可以使用诸如我的工具(而不是其他一些更著名的工具)(而不是自己动手做)(其中有些甚至不使用Word)。

If this is a client application and you have access to Word, why not automate Word? 如果这是一个客户端应用程序,并且您有权访问Word,为什么不自动化Word? Word can save in HTML (although you will probably have to clean the HTML up a bit). Word可以保存为HTML(尽管您可能必须清理一下HTML)。 However, I will warn you that this is not very portable; 但是,我会警告您这不是很方便。 whoever is going to use application will need to have the same version of Word you developed it with. 无论谁打算使用该应用程序,都需要具有与之一起开发的Word版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM