I have a dll that needs to open an excel file but i cannot seem to create the path to the file. The excel file is a template that must be used to compare with an excel file that the user will browse for and open.
I have used this code previously when using an exe file for my application:
string path = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "Data\\BulkMaintenanceExample.xls");
but with a dll it does not seem to work. Any Ideas?
Try following to get the assembly path:
or
or