Skip to content

Commit 7c669ba

Browse files
committed
#14: close file handle explicitly
1 parent 7797fbc commit 7c669ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: pyexcel_xlsx/xlsxr.py

+4
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ def read_sheet(self, native_sheet):
106106
sheet = XLSXSheet(native_sheet, **self._keywords)
107107
return {sheet.name: sheet.to_array()}
108108

109+
def close(self):
110+
self._native_book.close()
111+
self._native_book = None
112+
109113
def _load_the_excel_file(self, file_alike_object):
110114
self._native_book = openpyxl.load_workbook(
111115
filename=file_alike_object, data_only=True, read_only=True)

0 commit comments

Comments
 (0)