XLL+ Class Library

XLL+ AppWizard for .NET/2005

Note: this topic describes the XLL+ AppWizard for Visual Studio .NET and Visual Studio 2005. See also: XLL+ AppWizard for Visual Studio 6.

The XLL+ .NET/2005 AppWizard is a Custom Wizard. You can use it to create a skeleton XLL project, containing many built-in features. For information on starting the AppWizard see Starting the XLL+ AppWizard in Visual Studio .NET or Visual Studio 2005.

How to use the AppWizard

Click the mouse on the controls on the picture below to see what they do.

XLL friendly name

This field determines the library name as it will be displayed in the Excel Add-Ins dialog.

The library name is implemented as the value of the application class’s static string member m_pszDefName, and can therefore be changed at any time.

Back to top

Runtime Library

Select which run-time library you wish to use. If your code uses Microsoft’s Foundation classes, then you must select MFC. If not, then select the STL option for lighter weight executables, and less DLL dependencies.

Back to top

Xll Plus Paths

This check-box determines whether the wizard adds the directories containing the XllPlus libraries and headers to your project.

If you keep your XllPlus files in a common directory structure with other libraries and headers, then you won’t need this.

If, on the other hand, you keep your XllPlus files where the setup program put them for you, you will find this a very convenient way to ensure that they are added to your project.

Back to top

Include a cache for results

Creates a results cache in the application class. See Function attribute: cacheresults for more information.

Back to top

Save the cache to file

Generates code to store the cache to file when the XLL is closed and restore it from file when the XLL is opened.

Back to top

Add a menu

Generates a CXlMenu in the header file and code to create and destroy the menu in OnXllOpenEx and OnXllClose.

Back to top

Add a toolbar

Generates code to create and destroy a toolbar containing one button in OnXllOpenEx and OnXllClose. Adds a bitmap for the button to the application's resource file.

Back to top

Override OnXllOpenEx() and OnXllClose()

Generates empty implementations of OnXllOpenEx and OnXllClose in the the header and source file.

Back to top

Comments

This check-box determines whether (reasonably helpful) comments will be inserted into the skeleton code that the AppWizard produces.

Unless you have a very good reason, and are familiar with the content of XllPlus skeleton code, it is a good idea to keep the comments.

Back to top

VersionInfo Function

Decide whether to include a VersionInfo function. This is useful as a library documentation function available from within Excel. It’s also a useful test as to whether your library has been built properly.

You can always delete the function later.

Back to top

Finish button

Click this button to complete the Wizard.

Back to top

Results

For a project named Fred, the following files will be created:

Fred.vcproj VC++ project file
Fred.h Contains the declaration of your application class, CFred
Fred.cpp Contains the implementation of CFred, including its constructor and InitInstance() and ExitInstance() virtual functions.
Fred.rc This file is a listing of all of the Microsoft Windows resources that the program uses. It initially contains only version information.
Fred.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions.
Fred.def This file contains the definition of the XLL and a list of essential exported functions. It is not usually necessary for you to edit it.
StdAfx.h
StdAfx.cpp
These files are used to build a precompiled header (PCH) file named XllPlusWiz.pch and a precompiled types file named StdAfx.obj.
resource.h This is the standard header file, which defines new resource IDs. Visual C++ reads and updates this file.
ReadMe.txt Instructions on building the project. These are worth reading if you have any problems building the project.

See Also

Starting the XLL+ AppWizard in Visual Studio .NET or Visual Studio 2005