I'm just getting into Python and am trying to write a script which prints a cell from a excel work book. I've got an input which I want to add 2 to the value so it finds the right cell. Just having a problem when I put the variable into the index. Could you help please?
I've tried looking at the other examples with the same callback but none answer the question.
import openpyxl
wb = openpyxl.load_workbook('kids.xlsx')
sheet = wb["Sheet1"]
print("Type index of student")
find_student = input()
val = int(find_student)
proper_index = val + 2
print(proper_index)
string_value = str(proper_index)
index_search = "'A" + string_value + "'"
print(index_search)
print(sheet[string_value].value)
Thanks