How to convert A excel Nontype data to int type. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to convert A excel Nontype data to int type.

Iam working with openpyxl in excel spread sheets. I had stored some integer values in spread sheet. when iam trying to perform operation on those data it showing cannot perform operations on Nontype. So I decided to convert that Nontype data to int and perform operations, but I don't how to convert. please help me.

19th Dec 2019, 3:27 AM
amarendra
amarendra - avatar
1 Answer
+ 2
If it's giving a TypeError reading something including "NoneType" means the operand upon which you're trying to perform operations on are not actually there and thus it's None for Python. And you cannot convert none to int or to anything. Try printing your extracted values from the sheet and trace the source of error.
21st Dec 2019, 6:17 AM
Шащи Ранжан
Шащи Ранжан - avatar