Open a read-only Excel file using Python
Question: I have a program (zTree) that is writing an Excel file and updating it
constantly. What I need this Python program to do is read in the data from the
Excel file as its updating. The problem that I'm having though is that when I
try to read in the data using xlrd, I get the error:

    
    
        peek = f.read(peeksz)
    IO Error: [Errno 13] Permission denied
    

which comes up because Excel is in read-only mode. Is there any way to read in
the data of an Excel file in read-only mode using Python?


Answer: just tested it on win 7 (64bit), but in this case it works:

    
    
    import xlrd
    workbook = xlrd.open_workbook('C:/User/myaccount/Book1.xls')
    worksheet = workbook.sheet_by_name('Sheet1')
    print worksheet
    

could it be, that you are trying to copy it first, or that your python is
trying to put a temporary copy of the file in the py-directoy? - because that
would give the IO-Error

