Consider such ExcelDNA function definition:
[ExcelFunction(Name = "Fnc1", Description = "Fnc1")]
public static object Fnc1(
[ExcelArgument(Name = "Arg1", Description = "Arg1", AllowReference = true)]
object rng)
{
// ...
}
- It works fine when called with a single cell like this
=Fnc1(A1)
or with continuous range of cells like this=Fnc1(A1:A3)
. - But it doesn't work when called with discontinuous range of cells e.g.
=Fnc1(A1,A5,A10)
. The error#VALUE!
is returned.
Is there a way how to call ExcelDNA function with discontinuous range of unknown amount of cells?
I have tryied to declare the paramter like this params object[] rng
but no luck as well.