Whenever I have the file open in Excel and run the code, I get the following error which is surprising because I thought read_excel should be a read only operation and would not require the file to be unlocked?
Traceback (most recent call last):
File "C:UsersPublica.py", line 53, in <module>
main()
File "C:UsersPublicworkspacea.py", line 47, in main
blend = plStream(rootDir);
File "C:UsersPublicworkspacea.py", line 20, in plStream
df = pd.read_excel(fPath, sheetname="linear strategy", index_col="date", parse_dates=True)
File "C:UsersPublicContinuumAnaconda35libsite-packagespandasioexcel.py", line 163, in read_excel
io = ExcelFile(io, engine=engine)
File "C:UsersPublicContinuumAnaconda35libsite-packagespandasioexcel.py", line 206, in __init__
self.book = xlrd.open_workbook(io)
File "C:UsersPublicContinuumAnaconda35libsite-packagesxlrd\__init__.py", line 394, in open_workbook
f = open(filename, "rb")
PermissionError: [Errno 13] Permission denied: '<Path to File>'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…