Skip to content

Commit f4ffed2

Browse files
authored
Fix External File Excel Handling (#699)
1 parent 009663a commit f4ffed2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

dotnet/src/dotnetframework/GxExcel/GxExcelEPPlus.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,16 @@ public short Open(String fileName)
5757
fileName += Constants.EXCEL2007Extension;
5858
}
5959
if (file.IsExternalFile)
60-
{
60+
{
6161
Stream stream = file.GetStream();
62+
6263
if (stream != null)
6364
{
64-
p = new ExcelPackage(file.GetStream());
65+
p = new ExcelPackage(stream);
6566
}
6667
else
6768
{
68-
errCod = 4;
69-
errDescription = "Invalid file.";
70-
return errCod;
69+
p = new ExcelPackage();
7170
}
7271
}
7372
else

0 commit comments

Comments
 (0)