Creating a wrapper project

This topic contains the following sections.

  • Wrapping an add-in authored using XLL+
  • Wrapping an add-in from any other source

You can use either of two methods to create the XLL wrapper project.

If you authored the XLL using Planatech's XLL+, use the procedure for XLL+.

If the XLL was produced in any other way, use the procedure for other sources.

Wrapping an add-in authored using XLL+

Please refer to the following XLL+ help topic: Tools Reference/XLL Wrapper/XLL Wrapper Generator/Getting Started/Creating a wrapper project, and to the topics that follow it.

Wrapping an add-in from any other source

To wrap an XLL from any source other than XLL+, you can use the procedure for XLL+ projects and then make some changes as follows:

  1. Select any XLL+ sample project and use it as a starting point to create a wrapper project, using the XLL+ Wrapper project wizard, as described in the XLL+ help topics.
  2. Save the solution, and then copy the entire directory containing the wrapper project to a new location. Return to the solution and remove the new wrapper project from the solution.
  3. Use Visual Studio to open the new copy of the project, and save it to create a new solution file.
  4. Inspect the XML files in the project, which are [LibName].model.xml and [LibName].wrapper.xml.
  5. Use the XllScan tool to produce a model file from the XLL.
  6. Sometimes the XllScan tool will not succeed and you will need to actually open the XLL in Excel in order to inspect its add-in functions.
    In these cases, use the XllQuery tool to produce a model file from the XLL. You must perform this step on a machine which has Excel installed, and where you have administrator's rights.
    Note that XllQuery should not be made a standard step in a build, because it temporarily alters the Excel configuration on the developer's machine, by renaming (and later restoring) the XLCALL32.DLL dynamic link library.
  7. Take the model file produced by XllScan or XllQuery and use it to replace the model file in your wrapper project.
  8. In your wrapper project, remove the reference to the assembly XllPlus.ComWrappers.Runtime and replace it with a reference to XllHost.ComWrappers.Runtime, which can be found in the bin\XllHost sub-directory of your XLL+ installation folder.