From 54a3641b1bed3e1a45046c3da5b14e7c883e8953 Mon Sep 17 00:00:00 2001 From: Gonzalo Gallotti Date: Fri, 21 Oct 2022 14:46:13 -0300 Subject: [PATCH] Fix External File Excel Handling --- dotnet/src/dotnetframework/GxExcel/GxExcelEPPlus.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dotnet/src/dotnetframework/GxExcel/GxExcelEPPlus.cs b/dotnet/src/dotnetframework/GxExcel/GxExcelEPPlus.cs index e923b8ecd..6b1806a2a 100644 --- a/dotnet/src/dotnetframework/GxExcel/GxExcelEPPlus.cs +++ b/dotnet/src/dotnetframework/GxExcel/GxExcelEPPlus.cs @@ -57,17 +57,16 @@ public short Open(String fileName) fileName += Constants.EXCEL2007Extension; } if (file.IsExternalFile) - { + { Stream stream = file.GetStream(); + if (stream != null) { - p = new ExcelPackage(file.GetStream()); + p = new ExcelPackage(stream); } else { - errCod = 4; - errDescription = "Invalid file."; - return errCod; + p = new ExcelPackage(); } } else