Reputation: 3846
I am using the function open_workbook() to open an excel file. But I cannot find any function to close the file later in the xlrd module. Is there a way to close the xls file using xlrd? Or is not required at all?
Upvotes: 23
Views: 23155
Reputation: 96
The open_workbook calls the release_resources ( which closes the mmaped file ) before returning.
Upvotes: 6
Reputation: 12651
Digging into the mailing list archive, it seems that the file object is closed directly by the constructor, so you don't need to close it explicitly.
Upvotes: 22