简体   繁体   中英

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. I am even not aware if we can compare two docs using POI or not. Please help if you have any other API which compares two word docs like the utility in MS Word does.

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. You will have to make use of the APIs and compare them manually.

If you have Word installed, you can call Word to build a "diff" document, where all changes are highlighted. You could use a COM wrapper for Java to achive this.

Maybe OpenOffice has the same functionality for Linux.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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