I want to look at two columns lets say B1 to B8 and C1 to C8. I want to compare those ranges and if the columns don't match i want to color the cell. Here is how much i have figured out.
#I can open the excel and I can parse through the cells and print the values also:
#I can also color the cells
rng=cell2.Range ("C8")
rng.Interior.Co lorIndex = 6
#BUT HOW DO I COMPARE TWO COLUMNS B8 and C8, B9 and C9, B10 and C10...and color them if they are different easily?
Code:
import win32com.client
xlApp = win32com.client.Dispatch("Excel.Application")
xlApp.Visible=1
xlWb = xlApp.Workbooks.Open(r"C:\Template_Rev_3.2.xls")
print xlApp.Worksheets("sheet1").Name
Code:
for x in cell2.Range("B8","B78"):
print str(x)
rng=cell2.Range ("C8")
rng.Interior.Co lorIndex = 6
#BUT HOW DO I COMPARE TWO COLUMNS B8 and C8, B9 and C9, B10 and C10...and color them if they are different easily?
Comment