xlrd will load your worksheet file into memory at the time you call the open_workbook()
method. Any changes made to the worksheet file after you call open_workbook()
are not automatically reflected in the object in memory.
If you take a look at the xlrd source code on Github, in particular the open_workbook() method of the book.py file, you'll see that it loads the contents of the worksheet into memory when the open_workbook()
method is called. That means, if you call open_workbook()
, then change the original file, the workbook in memory will not reflect those changes.
This is also why, when you use the xlwt module, you must use the write()
method - when you modify the contents of the worksheet that is in memory, the changes are not reflected in the original file, until you call write()
.