1

I am using

df = pd.read_excel('FileA.xlsx', sheet_name = 'sheetc')

to read excel data using PyCharm. It is working for specific sheets in the workbook, but for other sheets in the same workbook I am getting this error:

ValueError: Worksheet named 'sheetc' not found.

Does anyone know why this could be, please?

jrd1
  • 9,026
  • 4
  • 30
  • 48
  • You can check to see what sheet names Pandas is reading from the Excel sheet and use the relevant one of choice via: https://stackoverflow.com/questions/17977540/pandas-looking-up-the-list-of-sheets-in-an-excel-file – jrd1 Feb 15 '21 at 16:11

0 Answers0