Read _AssemblyLocation Programmatically From VSTO Excel Tutorial
I have a Visual Studio Excel workbook project. When I publish the workbook and examine the source of the workbook (I open WinZip and check the custom.xml), I see the _AssemblyLocation tag that matches the publish path.
Is there a way to read the _AssemblyLocation from my .NET code?
I would like to be able to read the publish path and determine which environment (development / quality assurance / production) I am in based on the server name.
+1
source to share
2 answers
I think you could open xlsx using the ZipPackage class and then read the XML using Xquery or xlinq, etc.
http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx
+2
source to share