python read excel Worksheet index 0 is invalid, 0 worksheets found

https://miro.medium.com/max/1400/1*FAGWIm_mhdqVz-CXtEWhHg.png

A simple solution to python — Pandas: ValueError: Worksheet index 0 is invalid, 0 worksheets found — Stack Overflow

  1. Check your target file
  2. find the sheet’s name

https://miro.medium.com/max/726/1*LVZ0ZWG2UxYfXUbeAq8OeA.png

  1. launch a new blank excel

  2. find the sheet’s name

https://miro.medium.com/max/738/1*_87mu4KBYmV9bRIfIc4t_A.png

If they have a different default worksheet name, close all Excels, and regenerate the target excel. (The default worksheet name would be switched back to normal)

Now re pd.read_excel again. It’ll be successful.

Contact me: Hung, Chien-Hsiang (chienhsiang-hung.github.io)