How to load a .dna file and run it manually in .Net?

Jun 12, 2013 at 3:03 PM
Edited Jun 12, 2013 at 3:07 PM
Hi Govert,

With a simple dna file below:
<DnaLibrary RuntimeVersion="v4.0">
<![CDATA[
Public Module MyFunctions
    Sub test1()
        MsgBox(ExcelDnaUtil.Application.ActiveSheet.Name)
    End Sub
End Module
]]>
</DnaLibrary>
is there anyway to load and run it programlly in .Net?

I guess a method: ExcelDna.Integration.DnaLibrary.LoadFrom(fileName As String) may do it, but cannot find a way to invoke the test1() in dna file.
Coordinator
Jun 12, 2013 at 3:07 PM
Hi,

Do you mean to load it from another add-in in Excel?

-Govert
Jun 12, 2013 at 3:13 PM
Edited Jun 12, 2013 at 3:28 PM
Yes.

I've developed a .Net dll as an add-in loaded by an xll file. Then I've to do some works optionally, which can be choosed by end-users.
Jun 22, 2013 at 6:16 AM
I used IronPython as script at last. Thank you all the same.