Hi Rich,
It might be less disruptive to get the UDF caller in error cases.
var caller = XlCall.Excel(XlCall.xlfCaller) as ExcelReference;
// caller might be null in some cases
You can the calling sheet info:
var sheetName = XlCall.Excel(XlCall.xlSheetNm, caller);
And you can get the (0-based) row and column information from the ExcelReference object itself.
If you still want to go for AllowReference=true, then you can convert from a reference to a value by calling ExcelReference.GetValue().
This will give you one of the supported input types: string, double, bool, object[,], ExcelError, ExcelEmpty, ExcelMissing.
From there to get to a string, a double or a DateTime is then up to you.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/360c466a-454a-4603-95d1-9fcfd1afd19en%40googlegroups.com.