Hi Soumya,
You can retrieve the full path of the .xll like this:
string xllPath = (string)XlCall.Excel(XlCall.xlGetName);
From there you can then get the directory and load other files that
are placed next to the .xll.
Regards,
Govert
On Oct 18, 11:07 am, Soumya <
soumy...@algotree.com> wrote:
> Hi Govert
>
> I have some issues while packing . I used a separate file for
> configuration named config.properties . I use
> System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAsse mbly().CodeBase)..Replace("file:\\",
> ""); to get the config file path. It worked fine in add-in and all
> configurations are loaded . But while packing and tried I got the path as C:\Windows\Microsoft.Net
> \assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\config.properties
> and hence can't load the configurations !!!
> I don't want to set the configurations in FirstAddIn.xll.config . Is
> there any better way to read configurations from external file ??
>
> On Wednesday, October 17, 2012 4:26:12 PM UTC+5:30, Govert van Drimmelen
> wrote:
>
>
>
>
>
>
>
>
>
> > Hi Soumya,
>
> > Yes - it all the libraries and dependencies are packed, you should only
> > need to distribute the single packed .xll file.
>
> > I suggest you follow these steps:
> > 1. make a clean directory with your all the files your add-in needs to
> > run. Check that the add-in works from this directory.
> > 2. Run the ExcelDnaPack, and check the output for any error. It will show
> > you which files have been packed into the .xll file. Confirm that
> > everything you expect has been packed, and there are no errors.
> > 3. Copy the -packed.xll file to an empty directory, and try to open it.
>
> > If you're still stuck, it would help if you could post the output of
> > ExcelDnaPack, and maybe explain what other libraries your add-in uses.
>
> > Regards,
> > Govert
>
> > ------------------------------
> > *From:*
exce...@googlegroups.com <javascript:> [
exce...@googlegroups.com<javascript:>]
> > on behalf of Soumya [
soum...@algotree.com <javascript:>]
> > *Sent:* 17 October 2012 08:32 AM
> > *To:*
exce...@googlegroups.com <javascript:>
> > *Subject:* [ExcelDna] FirstAddIn-packed.xll didn't work
>
> > I understand FirstAddIn-packed.xll is a single file add-in
> > which can be renamed, distributed and run with no other files required.
> > Does it means a user only required this packed file to run the application
> > ??
>
> > I got its worked when I created a new class library by
> > following steps in a tutorial .But in the existing project which I
> > renamed it doesnt work so I suspect I miss some configuration while
> > renaming .
>
> > Can any one help to solve this problem ??
>
> > Thanks
> > Soumya
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Excel-DNA" group.
> > To view this discussion on the web visit
> >
https://groups.google.com/d/msg/exceldna/-/5W7cUTMeZkwJ.
> > To post to this group, send email to
exce...@googlegroups.com<javascript:>
> > .
> > To unsubscribe from this group, send email to
> >
exceldna+u...@googlegroups.com <javascript:>.