简体   繁体   English

我们可以使用Apache POI比较两个MS Word文档吗? 如果不能,我还可以使用其他什么Api?

[英]Can we compare two MS Word Docs using Apache POI? If not what other Api can i use?

Hi I am searching for an API which compares two word docs and saves the comparison result in the third word doc.I am not able to find what method in POI is used to do the comparison. 嗨,我正在寻找一个API,该API比较两个单词文档并将比较结果保存在第三个单词doc中。我无法找到POI中使用哪种方法进行比较。 I am even not aware if we can compare two docs using POI or not. 我什至不知道我们是否可以使用POI比较两个文档。 Please help if you have any other API which compares two word docs like the utility in MS Word does. 如果您有任何其他API可以比较两个Word文档,例如MS Word中的实用程序,请提供帮助。

Will appreciate your suggestions . 将感谢您的建议。 Thanks. 谢谢。

POI helps in reading & writing the doc files, but there is no single API for comparing the files and saving the diff details into third file. POI有助于读取和写入doc文件,但是没有用于比较文件并将差异详细信息保存到第三个文件的API。 You will have to make use of the APIs and compare them manually. 您将必须使用这些API并进行手动比较。

If you have Word installed, you can call Word to build a "diff" document, where all changes are highlighted. 如果安装了Word,则可以调用Word来构建“ diff”文档,其中所有更改都将突出显示。 You could use a COM wrapper for Java to achive this. 您可以使用Java的COM包装器来实现此目的。

Maybe OpenOffice has the same functionality for Linux. 也许OpenOffice对于Linux具有相同的功能。

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

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