Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
Commit #67eadd18f55a.
Browse files Browse the repository at this point in the history
  • Loading branch information
VahidN committed Jan 10, 2017
1 parent aa201cb commit 8e05f5c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/EPPlus.Core/FormulaParsing/Excel/Functions/Math/SumIfs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ public override CompileResult Execute(IEnumerable<FunctionArgument> arguments, P
{
var functionArguments = arguments as FunctionArgument[] ?? arguments.ToArray();
ValidateArguments(functionArguments, 3);
var sumRange = ArgsToDoubleEnumerable(true, new List<FunctionArgument> {functionArguments[0]}, context).ToList();
var rows = new List<int>();
var valueRange = functionArguments[0].ValueAsRangeInfo;
List<double> sumRange;
if(valueRange != null)
{
sumRange = ArgsToDoubleEnumerableZeroPadded(true, valueRange, context).ToList();
}
else
{
sumRange = ArgsToDoubleEnumerable(true, new List<FunctionArgument> { functionArguments[0] }, context).Select(x => (double)x).ToList();
}
var argRanges = new List<ExcelDataProvider.IRangeInfo>();
var criterias = new List<string>();
for (var ix = 1; ix < 31; ix += 2)
Expand Down

0 comments on commit 8e05f5c

Please sign in to comment.