Array result #VALUE! error

62 views
Skip to first unread message

Ipek Cergel

unread,
Aug 10, 2023, 3:00:41 AM8/10/23
to Excel-DNA
Hello everyone,

I have a dynamic function that returns a [2,2] object array. But i get the #VALUE! error. 

My result array is something like this: 
                var result = new object[2, 2];
                result[0, 0] = "A";
                result[0, 1] = "B";
                result[1, 0] = "C";
                result[1, 1] = "D";
                return result;

My function is: 
=@_STCALCLIST(1;"211";"5.03.2013";"27.03.2014";;2;1;;"STRNS.PROJECTREF";"STRNS.PROJECTREF")

And I am using exceldna.v1.1.1. Can you give me any directions with the problem I've got?

Govert van Drimmelen

unread,
Aug 10, 2023, 3:32:26 AM8/10/23
to exce...@googlegroups.com
Any unhandled exception in your function will be returned as #VALUE. I'm guessing the problem is not the object[,] array you are returning. Maybe wrap the function in a try-catch to see if there's something else going wrong.

-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/4356baf9-d13d-4adc-a742-1f1eda140e5cn%40googlegroups.com.

Kedar Kulkarni

unread,
Aug 10, 2023, 4:45:21 AM8/10/23
to Excel-DNA
Also please remove @ from the function start as it forces excel return just one value even if formula returns array. (assumption - you are trying to using Office 365 and want to return dynamic array) 

Thanks 
Kedar 

Ipek Cergel

unread,
Aug 18, 2023, 8:07:38 AM8/18/23
to Excel-DNA
When I checked I saw the return value was JArray. So when I removed @ and returned the object array my problem was solved.
Thank you for your help. 
10 Ağustos 2023 Perşembe tarihinde saat 11:45:21 UTC+3 itibarıyla Kedar Kulkarni şunları yazdı:
Reply all
Reply to author
Forward
0 new messages