简体   繁体   English

将Word文件(doc / docx)转换为html文本

[英]Convert Word file (doc/docx) in to html text

I don't want to use Interop objects as Excel wis not installed in my computer. 我不想使用Interop对象,因为我的计算机中未安装Excel。 If separate dll is there for Interop than its OK. 如果有单独的dll供Interop使用,则不可以。

您可以使用DocX ,它具有一个不错的api,并且您不需要使用互操作库。

You need OpenXml PowerTools . 您需要OpenXml PowerTools Here is the documentation . 这是文档

And here is the doc/video how you use Html conversion. 这是您如何使用HTML转换的文档/视频

Unfortunately this only works for DOCX. 不幸的是,这仅适用于DOCX。
DOC is a different format and OpenXML tools won't work on it. DOC是一种不同的格式,而OpenXML工具将无法使用它。

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

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