Ask coding questions

← Back to all posts
how to use "openpyxl"
Mike0990 (0)

I aleady installed in my computer, but when I use by pycharm
it does'worked.I don't know why? and how to solve ?


import openpyxl

wb = openpyxl.load_workbook("C:\excel_python\03\data\sample.xlsx")
for sheet in wb:
for row in sheet:
for cell in row:


C:\Users\skk_f\PycharmProjects\untitled1\Scripts\python.exe C:/excel_python/03/python_prg/
Traceback (most recent call last):
File "C:/excel_python/03/python_prg/", line 1, in <module>
import openpyxl
ModuleNotFoundError: No module named 'openpyxl'

Process finished with exit code 1

SixBeeps (5221)

You're trying to reference the file at C:\excel_python\03\data\sample.xlsx, but that file doesn't exist on's servers. Try uploading the Excel spreadsheet to your Repl and referencing that path.