XLL path

14 views
Skip to first unread message

gertja...@gmail.com

unread,
Jul 10, 2026, 3:01:23 AM (yesterday) Jul 10
to Excel-DNA
Hello all.  How can I access the path of the XLL from inside my VB.NET code?

Govert van Drimmelen

unread,
Jul 10, 2026, 4:47:02 AM (yesterday) Jul 10
to Excel-DNA
In Excel-DNA, use ExcelDnaUtil.XllPath:

Imports ExcelDna.Integration

Dim xllPath As String = ExcelDnaUtil.XllPath
Dim xllFolder As String = IO.Path.GetDirectoryName(xllPath)

ExcelDnaUtil.XllPath returns the full path of the currently loaded .xll. This is preferable to using Assembly.Location, which may return the path of your packed or unpacked managed assembly rather than the host XLL.

On Fri, 10 Jul 2026, 09:01 gertja...@gmail.com, <gertja...@gmail.com> wrote:
Hello all.  How can I access the path of the XLL from inside my VB.NET code?

--
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 visit https://groups.google.com/d/msgid/exceldna/4afd29b0-7ce9-4f19-853c-d87c443ef530n%40googlegroups.com.

gertja...@gmail.com

unread,
Jul 10, 2026, 4:54:12 AM (yesterday) Jul 10
to Excel-DNA
Brilliant.  That works a treat.
P.S. did you also see my query about an error that only occurs outside of DEBUG mode?

Reply all
Reply to author
Forward
0 new messages