pandasopenpyxlxlrdpython-3.11

Unable to read an Excel file using Pandas


I can read an Excel file from pandas as usual:

df = pd.read_excel(join("./data", file_name) , sheet_name="Sheet1")

I got the following error:

ValueError: Value must be either numerical or a string containing a wildcard

What I'm doing wrong?

I'm using: Pandas 1.5.3 + python 3.11.0 + xlrd 2.0.1


Solution

  • I got the same issue and then realized that the sheet I was reading is in "filtering" mode. Once I deselect "sort&filter", the read_excel function works.