i am trying to store one column in a single variable.but I cant
code
import openpyxl
wb = openpyxl.load_workbook("coordinates.xlsx")
sh2 = wb['sheet2']
sh1 = wb['sheet1']
x1 = (wb['sheet2'].columns["B"]).values
print(x1)
error
x1 = (wb['sheet2'].columns["B"]).values
TypeError: 'generator' object is not subscriptable
Process finished with exit code 1
why does this happen? is there any other way to store the entire data of single column in one variable?