I need help to read xlsx file present inside rar pack. I am using below code, however get an error. Is there any better way to read/extract file?
rar = glob.glob(INPATH + "*xyz*.rar*")
rf = rarfile.RarFile(rar[0])
for f in rf.infolist():
print(f.filename, f.file_size)
df = pd.read_excel(rf.read(f))
rarfile.RarCannotExec: Cannot find working tool
According to the brief PyPI docs, you need
unrarinstalled and on your PATH in order for the module to work. It does not implement the RAR unpacking algorithm itself.(Presumably you need
raras well, for creating archives.)