开发者

Java: How can I check is file correct MS Word document?

开发者 https://www.devze.com 2023-03-14 15:47 出处:网络
How c开发者_JAVA百科an I check is file correct MS Word document by using Java? The main purpose is filter files that will be opened by MS Word with any mistakeTry a Java API for MS Office Docs.Apache

How c开发者_JAVA百科an I check is file correct MS Word document by using Java? The main purpose is filter files that will be opened by MS Word with any mistake


Try a Java API for MS Office Docs.


Apache POI is a great project for reading and writing MS Word docs from Java. However, it is not MS Word. So whilst it can open a lot of Word documents, there will always be a margin for error. ie. Documents that it considers ok, but have problems when opened by Word. The only program that can accurately open and check a Word document is Word itself.

So you need to consider what you mean by opening "without any mistake". What are you actually trying to validate? and perhaps - do you really need to do this at all?

0

精彩评论

暂无评论...
验证码 换一张
取 消