Python Error解决方案:from openpyxl.cell import get_column_letter, column_index_from_string ImportError

Python Error解决方案:from openpyxl.cell import get_column_letter, column_index_from_string ImportError

When you want to use openpyxl to connect to Excel, maybe you want to use get_column_letter(1) to perform the corresponding conversion, but after importing the library:from openpyxl.cell import get_column_letter, column_index_from_stringLater, an error was found.

solution

把from openpyxl.cell import get_column_letter, column_index_from_string换成from openpyxl.utils import get_column_letter,column_index_from_string

Let's see the result
Insert picture description here
solve!

Guess you like

Origin blog.csdn.net/XRTONY/article/details/113818283