File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,37 @@ public static string NativeStringArray(string[] s)
354354| A3 | World |
355355| B1 | =NativeStringArray(A1: A3 ) | Native StringArray VALS: 12.3World
356356
357+ ## String array 2D parameter
358+
359+ ``` csharp
360+ [ExcelFunction ]
361+ public static string NativeStringArray2D (string [,] s )
362+ {
363+ string result = " " ;
364+ for (int i = 0 ; i < s .GetLength (0 ); i ++ )
365+ {
366+ for (int j = 0 ; j < s .GetLength (1 ); j ++ )
367+ {
368+ result += s [i , j ];
369+ }
370+
371+ result += " " ;
372+ }
373+
374+ return $" Native StringArray2D VALS: {result }" ;
375+ }
376+ ```
377+
378+ | Cell | Formula | Result
379+ | ----- | ----------------------------| ------
380+ | A1 | 01 |
381+ | A2 | 2.30 |
382+ | A3 | Hello |
383+ | B1 | 5 |
384+ | B2 | 6.7 |
385+ | B3 | World |
386+ | C1 | =NativeStringArray2D(A1: B3 ) | Native StringArray2D VALS: 15 2.36.7 HelloWorld
387+
357388# Not supported functionality in native add-ins
358389
359390Loading images for ribbon controls.
You can’t perform that action at this time.
0 commit comments