File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,30 @@ public static string NativeRangeAddress(IRange r)
313313| A2 | =NativeRangeAddress(B2: C4 ) | Native Address: $B$2:$C$4
314314| A3 | =NativeRangeAddress((B2,D5: E6 )) | Native Address: $B$2,$D$5:$E$6
315315
316+ ## Enums parameter and return value
317+
318+ ``` csharp
319+ [ExcelFunction ]
320+ public static string NativeEnum (DateTimeKind e )
321+ {
322+ return " Native Enum VAL: " + e .ToString ();
323+ }
324+
325+ [ExcelFunction ]
326+ public static DateTimeKind NativeEnumReturn (string s )
327+ {
328+ return Enum .Parse <DateTimeKind >(s );
329+ }
330+ ```
331+
332+ | Cell | Formula | Result
333+ | ----- | -------------------------------- | ------
334+ | A1 | =NativeEnum("Unspecified") | Native Enum VAL: Unspecified
335+ | A2 | =NativeEnum("Local") | Native Enum VAL: Local
336+ | A3 | =NativeEnum(1) | Native Enum VAL: Utc
337+ | A4 | =NativeEnumReturn("Unspecified") | Unspecified
338+ | A5 | =NativeEnumReturn("Local") | Local
339+
316340# Not supported functionality in native add-ins
317341
318342Loading images for ribbon controls.
You can’t perform that action at this time.
0 commit comments