diff --git a/src/Dynamicweb.DataIntegration.Providers.ExcelProvider.csproj b/src/Dynamicweb.DataIntegration.Providers.ExcelProvider.csproj index 158629c..f33b594 100644 --- a/src/Dynamicweb.DataIntegration.Providers.ExcelProvider.csproj +++ b/src/Dynamicweb.DataIntegration.Providers.ExcelProvider.csproj @@ -1,6 +1,6 @@  - 10.4.0 + 10.4.1 1.0.0 Excel Provider Excel Provider diff --git a/src/ExcelProvider.cs b/src/ExcelProvider.cs index 787e8c2..50ff817 100644 --- a/src/ExcelProvider.cs +++ b/src/ExcelProvider.cs @@ -166,18 +166,22 @@ void IDestination.SaveAsXml(XmlTextWriter xmlTextWriter) { if (!string.IsNullOrEmpty(WorkingDirectory)) { - return new ExcelSourceReader(GetSourceFilePath(), mapping, this); + var sourceFilePath = GetSourceFilePath(); + if (!File.Exists(sourceFilePath)) + throw new Exception($"Source file {SourceFile} does not exist - Working Directory {WorkingDirectory}"); + + return new ExcelSourceReader(sourceFilePath, mapping, this); } else { - return new ExcelSourceReader(SourceFile, mapping, this); + if (!File.Exists(SourceFile)) + throw new Exception($"Source file {SourceFile} does not exist - Working Directory {WorkingDirectory}"); + + return new ExcelSourceReader(SourceFile, mapping, this); } } else - { - Logger?.Error("The file is not a Excel file"); - return null; - } + throw new Exception("The file is not a Excel file"); } public override void Close()