Browse Source

Merge pull request #1815 from Avaiga/fix/window-doesnt-close-excel-file-read-by-pandas

Fix - load_workbook with read_only option when do reading
Đỗ Trường Giang 8 months ago
parent
commit
19b71034e5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      taipy/core/data/excel.py

+ 1 - 1
taipy/core/data/excel.py

@@ -175,7 +175,7 @@ class ExcelDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin):
     def _read_as(self, path: str):
         try:
             properties = self.properties
-            excel_file = load_workbook(path)
+            excel_file = load_workbook(path, read_only=True)
             exposed_type = properties[self._EXPOSED_TYPE_PROPERTY]
             work_books = {}
             sheet_names = excel_file.sheetnames