ValueError: Unknown engine: openpyxl when trying to load Excel file to a dataframe on a Jupyternotebook

Viewed 2507

I'm getting this error: 'ValueError: Unknown engine: openpyxl' when I try to run this on a Jupyter Notebook:

import pandas as pd
df = pd.read_excel(r"C:\Users\XXX\YYY.xlsx", engine='openpyxl')

Already installed openpyxl with pip:

pip install openpyxl

'Requirement already satisfied: openpyxl in c:\users\XXX\appdata\local\programs\python\python37\lib\site-packages (3.0.9) Requirement already satisfied: et-xmlfile in c:\users\XXX\appdata\local\programs\python\python37\lib\site-packages (from openpyxl) (1.1.0) Note: you may need to restart the kernel to use updated packages.'

Already restarted the Kernel but the error persists.

Can someone help me here?

Thank you.

1 Answers

Just exclude engine='openpyxl', and retry. Looks little bit weird, but it works for me.

import pandas as pd

df = pd.read_excel(r"C:\Users\XXX\YYY.xlsx")

Related