Please forgive me for my lack of C# knowledge!
How do I access a required file at run time if I don’t know where my application is installed/exists on the hard drive? Also- How do I distribute this file with my application (i.e., have it in a C:\Program Files\MyApp\resouces\file.ext)?
Background:
I’m using C# on .NET 3.5 with Spreadsheet Gears. My program writes out a series of excel files based on the contents of a database. One of the requirements is that the header in the page setup either needs to have an image or text with multiple colors/formatting. I’ve looked into both methods extensively and found no solution for doing this programmatically. My fall back is to open a prebuilt excel file which already has the logo in the header (you can do this from within excel), place the data into the excel file, and save it under a new name in a user specified place.
Should I be looking into resources or opening pre-set template excel files?
Thanks for all your help!
If the users of your Application have the right privilege, I would go with using Registry object to query Registry. I might have misunderstood your question – I presume you are asking for a way to find the path of the application?