Skip to content

Commit 823873c

Browse files
committed
Added range parameter example.
1 parent 1896c15 commit 823873c

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

docs/guides-basic/dotnet-native-aot-support.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,33 @@ double v2)
234234
}
235235
```
236236

237-
![](./assets/native-aot-intellisense-fx.png)
237+
![](./assets/native-aot-intellisense-fx.png)
238+
239+
## Accepting range parameters in UDFs
240+
241+
```csharp
242+
[ExcelFunction]
243+
public static object NativeRangeConcat2(object[,] values)
244+
{
245+
string result = "";
246+
int rows = values.GetLength(0);
247+
int cols = values.GetLength(1);
248+
for (int i = 0; i < rows; i++)
249+
{
250+
for (int j = 0; j < cols; j++)
251+
{
252+
object value = values[i, j];
253+
result += value.ToString();
254+
}
255+
}
256+
return result;
257+
}
258+
```
259+
260+
| Cell | Formula | Result
261+
| ----- | -------------------------- | ------
262+
| A1 | str |
263+
| A2 | 1 |
264+
| B1 | TRUE |
265+
| B2 | 3.5 |
266+
| C1 | =NativeRangeConcat2(A1:B2) | strTrue13.5

0 commit comments

Comments
 (0)