Explorar o código

feat: load_workbook with read_only option when do reading

trgiangdo hai 8 meses
pai
achega
38a376c16d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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