Try to add new attribute

41 views
Skip to first unread message

文源

unread,
Aug 22, 2024, 9:10:54 AM8/22/24
to Excel-DNA
Hi Govert,

I am trying to add new featrues for excel-dna, such as enum list. First of all, I'm trying to add a new attribute in ExcelDna.Integration, just like enum = true, when I write a new custom function with attribute eum ,the compiler did not report an error. Then I read the code for trying to get the eum information.However, I found the Instance "reginfo" which use ExcelIntegration.GetRegistrationInfo to get the function information, I print the information just get information bellow:

[3,0]:
[3,1]:f2
[3,2]:QEE
[3,3]:Addliuyu
[3,4]:input1,input2
[3,5]:
[3,6]:Test .NET 6 add-in
[3,7]:
[3,8]:
[3,9]:returns a 7x2 array of information about the IntelliSense server status
[3,10]:input1 to add
[3,11]:input2 to add.
[3,12]:
[3,13]:
[3,14]:
......

There is  no information about my custom attribute enum. When I wanted to know more about its implementation, I couldn't find the relevant code.
How can I get the information about my new attribute, should I register this parameter , if it is,which cs file should I read and change?How can I add the information into the "reginfo"?
Also, I read the code of Class RegistrationInfo,

            object[] registerParameters = new object[6];
            registerParameters[0] = ExcelDnaUtil.XllPath;
            registerParameters[1] = "RegistrationInfo";
            registerParameters[2] = "QQ"; // Takes XLOPER12, returns XLOPER12
            registerParameters[3] = _registrationInfoName;
            registerParameters[4] = null;
            registerParameters[5] = 0; // hidden function

It seems  a little differerent with the print
Could you give me some suggstion?

Yuan

文 源

unread,
12:55 PM (3 hours ago) 12:55 PM
to exce...@googlegroups.com
获取Outlook for Android
Hello,
     I have a problem.The focus of the wpf window generated by the 'exceldna' plugin is always stolen by the excel main program. Text entered in the 'textbox' of the wpf window is directly written into the 'cell' of Excel, and the content pasted by using the 'Ctrl+V' shortcut key is also written into the 'cell' of Excel, instead of being pasted into the 'textbox' of the wpf window. How should I resolve this problem?

Yuan

Reply all
Reply to author
Forward
0 new messages