Bugfix G0005
diff --git a/EPPlus/FormulaParsing/ExcelValues.cs b/EPPlus/FormulaParsing/ExcelValues.cs index bcb75d5..57be38f 100644 --- a/EPPlus/FormulaParsing/ExcelValues.cs +++ b/EPPlus/FormulaParsing/ExcelValues.cs
@@ -43,7 +43,12 @@ /// <summary> /// Error error // Google Bug G0004 /// </summary> - Error + Error, + // Bug G0005 + /// <summary> + /// ErrorValueIsNullOrEmpty error // Google Bug G0005 + /// </summary> + ErrorValueIsNullOrEmpty } /// <summary> @@ -66,6 +71,7 @@ public const string Ref = "#REF!"; public const string Value = "#VALUE!"; public const string Error = "#ERROR!"; // Bug G0004 + public const string ErrorValueIsNullOrEmpty = "#ERRORVALUEISNULLOREMPTY!"; // Bug G0005 private static Dictionary<string, eErrorType> _values = new Dictionary<string, eErrorType>() { @@ -77,6 +83,7 @@ {Ref, eErrorType.Ref}, {Value, eErrorType.Value}, {Error, eErrorType.Error}, // Bug G0004 + {ErrorValueIsNullOrEmpty, eErrorType.ErrorValueIsNullOrEmpty} // Bug G0005 }; /// <summary> @@ -124,6 +131,11 @@ internal static ExcelErrorValue Parse(string val) { + if (string.IsNullOrEmpty(val)) // Google Bug G0005 + { + val = Values.ErrorValueIsNullOrEmpty; + } + if (Values.StringIsErrorValue(val)) { return new ExcelErrorValue(Values.ToErrorType(val)); @@ -166,6 +178,8 @@ return Values.Value; case eErrorType.Error: // Bug G0004 return Values.Error; + case eErrorType.ErrorValueIsNullOrEmpty: // Bug G0005 + return Values.ErrorValueIsNullOrEmpty; default: throw(new ArgumentException("Invalid errortype")); }