I have two xlsx
files as follows:
value1 value2 value3
0.456 3.456 0.4325436
6.24654 0.235435 6.376546
4.26545 4.264543 7.2564523
and
value1 value2 value3
0.456 3.456 0.4325436
6.24654 0.23546 6.376546
4.26545 4.264543 7.2564523
I need to compare all cells, and if a cell from file1 !=
a cell from file2
print
that.
import xlrd
rb = xlrd.open_workbook('file1.xlsx')
rb1 = xlrd.open_workbook('file2.xlsx')
sheet = rb.sheet_by_index(0)
for rownum in range(sheet.nrows):
row = sheet.row_values(rownum)
for c_el in row:
print c_el
How can I add the comparison cell of file1
and file2
?