Hi,
I have an issue understanding how files.compare or files.check work?
Below code which I used, is exactly same as shown in the example of files.compare, but I still see the issue in the comparision.
The files BIZDEVAgentPaymentSummary.xls and Downloads\BIZDEVAgentPaymentSummaryReport.xls are exactly same, I made a copy of first file and tried comparing, first time it showed me the files are same, then i made very small change for ex: in the first file if I had value "50" in one of the cell, I changed the 50 value to 51 in the second file and compared. This time also it showed me that both the files are same. I changed the value 51 to 50 from the second file, this time it is showing me that files are "not same".
Sub a
a
PrecalculatedDifference = Files.CalculateHashValue("C:\Users\anil.yadrami\Downloads\BIZDEVAgentPaymentSummary.xls", "C:\Users\anil.yadrami\Downloads\BIZDEVAgentPaymentSummaryReport.xls")
'Compare two excel files to see any changes are there...
If Not Files.Compare("C:\Users\anil.yadrami\Downloads\BIZDEVAgentPaymentSummary.xls", "C:\Users\anil.yadrami\Downloads\BIZDEVAgentPaymentSummaryReport.xls", PrecalculatedDifference) Then
Log.Error("Both the files are NOT same")
Else
log.Message("Both the files are same")
End If
End Sub
The "PrecalculatedDifference" give some strange number, how to know what exactly that number is?
How to do a simple excel file comparision? Can you provide me an example code please?
The "PrecalculatedDifference" give some strange number, how to know what exactly that number is?How to do a simple excel file comparision? Can you provide me an example code please?