Raise XLRDError - Indicating name of Python Sheet_name

0

Good morning. I'm starting with Python and I have a problem. I have N files in Excel and I need to read the sheet_name of each one stating their name, the code I have so far is this:

os.chdir("work path")
fileLista = glob.glob('*.xls')
arqFine= pd.DataFrame()
for arquivo in fileLista:
    df = pd.read_excel(arquivo, sheet_name = ["sheet do arquivo um ","sheet do arquivo dois","sheet do arquivo tres"], skiprows=1).split(',')
    arqFine= pd.concat([arqFine,df])
    arqFine.columns = arqFine.columns.str.strip()

When I do this it returns me the error: 'Raise XLRDError (' No sheet named <% r> '% sheet_name)' I do not understand the reason for returning this error, since the name of Sheet is just that. And when I put the "sheet = 1" returns information to me, but not the ones I want. Can anyone help me understand the problem? Thank you.

    
asked by anonymous 21.05.2018 / 16:57

0 answers