Answer the question
In order to leave comments, you need to log in
Why does explicit type casting not work in python (openpyxl)?
When concatenating a string with a given string, it gives an error that only strings can be connected to each other, although there is an explicit type conversion in the program.
tempstr = ""
for index, cell in enumerate(sheet['L']):
tempstr += str(sheet['A' + index + 5].value) # <-- ругается на эту строку
if(sheet['A' + index + 5] == 'None'):
tempstr += '/'
tempstr +=","
print(tempstr)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question