I've been trying to read an excel file with read_excel pandas method df_archivo = pd.read_excel(relative_file_path)
but it throws me an error.
ValueError: File is not a recognized excel file
def procesar_archivos_bitacora(directorio):
# Obtener la lista de archivos en el directorio
lista_archivos = get_files_in_path(directorio)
folder='input/'
download_all_files(lista_archivos,folder)
for archivo in lista_archivos:
local_path = join(folder,archivo)
print('joined path: ',local_path)
formatear_bitacora(local_path)
As you can see, I have my reading method inside a loop. 'joined path' is like I was expecting. And inside input folder there are only excel files.
The steps I'm following are:
- I download the file from a sharepoint directory
- I join the download folder directory with every downloaded file name
- Then I try to read each file using a loop