In Excel there is few number in hexadecimal format. I want to find its decimal equivalent in Python. Below is the code:
int(sheet.cell(2,2).value, 16)
as it is in Unicode it is not taking it as string and showing error:
ValueError: invalid literal for int() with base 16: ''
Your problem seems to be the empty string. See your error message.
int("", 16) # this will give ValueError
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.