By default, to use openpyxl, you can read the file, specify the sheet, and then read or specify the value in Sheet["A1"].
excel = openpyxl.Workbook()
sheet = excel['Sheet']
a = "hello"
sheet["A1"] = f"{a} world"
print(sheet["A1"].value)
If you find the coordinate value of the cell with the value of hello world, I am not sure how to find it as a double for statement.
excel = openpyxl.Workbook()
sheet = excel['Sheet']
a = "hello world"
for i in range(1, 100):
For j in range('A'-'ZZ'): # Col value is alphabets, so I think you need to implement this part.
if sheet[f'{i}{j}'].value == a:
return [i, j]
© 2023 OneMinuteCode. All rights reserved.