How can I read values from named ranges in Excel with openpyxl?
I've found the sourcecode at http://openpyxl.readthedocs.org/en/latest/_modules/openpyxl/workbook/names/named_range.html but I can't figure out how to use it properly.
wb = openpyxl.load_workbook(excel_file_name)
rng = wb.get_named_range(name_of_range).destinations[0]
sheet = rng[0]
address = rng[1].replace('$','')
val = sheet[address].value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With