Browse Source

feat: load_workbook with read_only option when do reading

trgiangdo 8 months ago
parent
commit
38a376c16d
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):
     def _read_as(self, path: str):
         try:
         try:
             properties = self.properties
             properties = self.properties
-            excel_file = load_workbook(path)
+            excel_file = load_workbook(path, read_only=True)
             exposed_type = properties[self._EXPOSED_TYPE_PROPERTY]
             exposed_type = properties[self._EXPOSED_TYPE_PROPERTY]
             work_books = {}
             work_books = {}
             sheet_names = excel_file.sheetnames
             sheet_names = excel_file.sheetnames