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