public class ExcelComparator extends Object
This utility will be used to compare Excel File Contents cell by cell for all sheets programmatically.
Below are the list of Attribute comparison supported in this version.
(Some of the above attribute comparison only work for *.xlsx format currently. In future it can be enhanced.)
Usage:
Workbook wb1 = WorkbookFactory.create(new File("workBook1.xls"));
Workbook wb2 = WorkbookFactory.create(new File("workBook2.xls"));
List<String> listOfDifferences = ExcelComparator.compare(wb1, wb2);
for (String differences : listOfDifferences)
System.out.println(differences);
System.out.println("DifferenceFound = "+ excelFileDifference.isDifferenceFound);
| Constructor and Description |
|---|
ExcelComparator() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
compare(Workbook wb1,
Workbook wb2)
Utility to compare Excel File Contents cell by cell for all sheets.
|
static void |
main(String[] args) |