Sep-23-2019, 08:28 PM
I am working through the exel chapter of Automate the Boring Stuff. I am typing exactly as the book is telling me on page 268 and getting an error message.
>>> import openpyxl >>> wb = openpyxl.load_workbook('Example_Page267.xlsx') >>> sheet = wb.get_sheet_by_name('Sheet1') >>> sheet['A1'] <Cell 'Sheet1'.A1> >>> sheet['A1'].value datetime.datetime(2015, 5, 4, 13, 34) >>> c = sheet['B1'] >>> c.value 'Apples' >>> 'Row ' + int(c.row) + ',Column ' + c.column + ' is ' + c.valuei then get the following error
Traceback (most recent call last): File "<pyshell#54>", line 1, in <module> 'Row ' + int(c.row) + ',Column ' + c.column + ' is ' + c.value TypeError: can only concatenate str (not "int") to str