How to Compare Price Lists
There are three or more price list for few years (For example: “2018”, “2019”, “2020”) in the XLSX format and you need to compare their contents.
Files | |
---|---|
Source | |
Target #1 | |
Target #2! | [](comparison/java/images/price-list-comparison_2.png) |
GroupDocs.Comparison provides the ability to compare three or more files in XLSX format(or any other supported file formats).
The following are the steps to compare three or more XLSX files
- Instantiate Comparer object with source document path or stream;
- Call add method and specify target document path or stream. Repeat this step for every target document;
- Call compare method.
The following code samples demonstrate how to compare three or more XLSX files.
try (Comparer comparer = new Comparer(SOURCE_FILE)) {
comparer.add(TARGET_FILE_ONE);
comparer.add(TARGET_FILE_TWO);
comparer.compare(RESULT_FILE);
}
As a result, we get a XSLX file where the deleted elements are marked in red, the added – in blue, and the modified – in green
Result Price List |
---|