diff --git a/src/NpoiExtension.cs b/src/NpoiExtension.cs index 7d4acdd..5e0a29b 100644 --- a/src/NpoiExtension.cs +++ b/src/NpoiExtension.cs @@ -291,7 +291,7 @@ private static IWorkbook InitializeWorkbook(string excelFile) var setting = Excel.Setting; if (setting.UserXlsx) { - if (!string.IsNullOrEmpty(excelFile) || File.Exists(excelFile)) + if (!string.IsNullOrEmpty(excelFile) && File.Exists(excelFile)) { using (var file = new FileStream(excelFile, FileMode.Open, FileAccess.Read)) { @@ -305,7 +305,7 @@ private static IWorkbook InitializeWorkbook(string excelFile) } else { - if (!string.IsNullOrEmpty(excelFile) || File.Exists(excelFile)) + if (!string.IsNullOrEmpty(excelFile) && File.Exists(excelFile)) { using (var file = new FileStream(excelFile, FileMode.Open, FileAccess.Read)) { diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index a967ed5..86975a3 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.0.0")] -[assembly: AssemblyFileVersion("1.4.0.0")] +[assembly: AssemblyVersion("1.4.1.0")] +[assembly: AssemblyFileVersion("1.4.1.0")]