Excel-DNA / Excel-DNA/ExcelDna

How to use Range as udf's input parameter?

Open
#352 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

I have a function, it use Range as its parameter, and return this parameter's adrresss:
```c#
[ExcelFunction(Description = "", Category = "")]
public static string address(Excel.Range rg)
{
return rg.get_Address();
}
```
i add a reference `Microsoft.Office.Interop.Excel` to project. and it can be compiled successfully. when i call excel, it failed:
> Initialization [Error] Method not registered - unsupported signature, abstract or generic: 'ExcelFunctions.address'

i expect excel's cell input formula:

> = address(C1)

the cell value will be a text:

> C1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.