I tried run a simple code reading a xls file and it returned the error in the title
when i try run this code:
import pandas as pd
from datetime import *
import os
print('Reading Sheets')
df_ccc_lll_22 = pd.read_excel(r'U:\OOO\CCCO\PPP CCC HHH.xls')
it returns this error:
Exception has occurred: ValueError
Excel file format cannot be determined, you must specify an engine manually.
File "U:\OOO\CCCO\teste.py", line 15, in <module>
df_ccc_lll_22 = pd.read_excel(r'U:\OOO\CCCO\PPP CCC HHH.xls')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Excel file format cannot be determined, you must specify an engine manually.
I don't know what to do, i tried openpyxl and it also returns an error saying the file is not Zip. xlrd didnt work as well
Regarding
xlsextension, the library typically used isxlrd.And you have to specify
xlrdas the engine when usingread_excelIf the file is not a genuine
.xlsfile (even if it has an.xlsextension), you may need to open it in Excel (or another spreadsheet program) and save it as an.xlsxfile. Then you can read it using theopenpyxlengine: