You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn how to implement a custom SUMPRODUCT function that exists in Excel but not in Telerik SpreadProcessing. The function works for basic cases but returns incorrect results for formulas with nested array functions.
21
+
Learn how to implement a custom [SUMPRODUCT](https://support.microsoft.com/en-us/office/sumproduct-function-16753e75-9f68-4874-94ac-4d2145a2fd2e) function in [RadSpreadProcessing]({%slug radspreadprocessing-overview%}).
22
22
23
23
## Solution
24
24
25
-
SpreadProcessing does not natively support full array formula evaluation or Excel-style boolean coercion inside custom functions. To achieve Excel-like results, manually evaluate nested logic before passing data to the custom function, or extend your implementation to handle nested expressions explicitly. Follow the steps below:
25
+
Follow the steps:
26
26
27
27
1. Register your custom SUMPRODUCT function using the `FunctionManager.RegisterFunction()` method.
28
28
@@ -87,8 +87,6 @@ SpreadProcessing does not natively support full array formula evaluation or Exce
@@ -122,22 +120,13 @@ SpreadProcessing does not natively support full array formula evaluation or Exce
122
120
123
121
result=values.Sum();
124
122
}
125
-
}
126
-
catch
127
-
{
128
-
// Do nothing
129
-
}
130
123
131
124
returnnewNumberExpression(result);
132
125
}
133
126
}
134
127
```
135
128
136
-
137
-
Avoid using nested array formulas inside the spreadsheet. Instead, preprocess arrays in your code and provide numeric arrays as direct input to the custom function.
-[SpreadProcessing: Implement the SUMPRODUCT Function](https://feedback.telerik.com/document-processing/1625149-spreadprocessing-implement-the-sumproduct-function)
143
-
-[SUMPRODUCT Function in Excel](https://support.microsoft.com/en-us/office/sumproduct-function-16753e75-9f68-4874-94ac-4d2145a2fd2e)
0 commit comments