Codematic Excel developers logo
Codematic spreadsheet-excel development image

Rapid Application Development / Advanced Excel Development

 
Products for Excel
Commercial Products:
  - Classic Ribbon
  - Alt-FileSearch
  - Password Remover
Spreadsheet Quality Products
Free Products
Excel Development
Excel Development Index
Excel VBA
- VBA IDE (editor)
- VBA Training
- VBA Best Practice
- VBA Performance
- COM Performance
- VBA Security
Excel and Databases
Excel and Pivot Tables
Excel Add-ins
Worksheet Functions
Excel and xlls
Excel (in)security
Excel testing
Excel and .net
Excel External Links
Excel Developer Types
Professional Excel Development
Excel 2007
Excel 2010
Excel Development Archive
Spreadsheet Services
Spreadsheet Development
Spreadsheet Migration
Spreadsheet Maintenance
Spreadsheet Review
Spreadsheet Management
Resources
Excel User Confs
Consultant Profile
Book Reviews
Links
Other
Site Map

Visual Studio Excel Xll Base Project

Whilst the xll features of Excel offer excellent functionality and superb performance, they are not for the faint hearted. Excel/VBA developers especially have trouble deciphering the documentation. Add in the need to use a different development environment and language and its easy to see why this powerful option is often rejected.

Download the zip here.

Xll Series Contents

(note this is a work in progress - more pages will be added and linked too as and when we have time to complete them to an acceptable level)

Codematic Base Xll project

This project is designed to be as easy as possible to use as an introduction to creating xlls.

Even opening it is as easy as possible:
There is a .dsw for Visual C++6.0 users and a .sln for (the free) Visual Studio C++ Express 2008. If you are using a version of Visual Studio between these open the .dsw and accept the offer to convert it to your VS version.

Creating an xll requires a whole bunch of scaffolding, which you can completely ignore once its in place. We have tried to put it in place for you so you don't ever have to consider it.

Part of that scaffolding is the Excel xll SDK from Microsoft. There are two versions of this. The Excel 97 version and the Excel 2007 version.
The Excel 97 version doesn't work so well with modern compilers. The 2007 one is quite a bit more complex to cope with the additional features of 2007.

The Codematic solution was to modify the single function that causes issues in modern compilers and stick with the 97 version, simply because that is more straightforward to understand for less experienced C/C++ devs.

The Microsoft SDK files are the ones highlighted here:


This base project is not meant for extremely complex systems, more for fairly simple lightweight functions, with the emphasis on easy to follow with limited C/C++ knowledge.

Whilst it may appear complex at first, many of the components can be basically ignored.

Here is a brief summary of each file from the included readme.txt:


Headers:
RegFuncs.h - (DO NOT EDIT) holds the prototypes for the registration and unregistration functions
TheAddin.h - (DO NOT EDIT) holds the definition of EXPORT
xlHelpers.h - (DO NOT EDIT) holds a few includes in a way that make them easier to manage.
TheFuncs.h - (DO NOT EDIT) Holds a couple of includes and the prototypes for the functions of the add-in. Add prototypes for new functions in here

TheAddin.def - (DO NOT EDIT) holds the export specification so C++ does not mangle the names so badly Excel cannot read it. Add new function names in the bottom section

Source files:
fw.c - (DO NOT EDIT) holds an include for the Microsoft xll SDK source code framewrk.c
TheAddin.c - (DO NOT EDIT) holds some includes and the open close control routines. May want to edit/remove the open/close messages
RegFuncs.c - (DO NOT EDIT) holds the actual registration and unregistration functions that are called on open/close
TheFuncs.c - this is where the actual function bodies can be added/edited. Note any parameter changes may need to reflected in the registration function.

If you used the Codematic xll generator to specify the function details you should only need to edit TheFuncs.c, everything else is autogenerated. You can use the generator to round trip the code if you later want to add more functions etc. Or you can go in a manually edit the following files:
TheFuncs.h (add function prototypes)
TheAddin.def (add exported name that will be visible from Excel sheets)
RegFuncs.c (add registration and unregistration blocks)
TheFuncs.c (add function bodies here)

 

Base project

Here is a base xll project (in C) to get you started. It contains a single UDF that takes two arguments and returns the total. It is in Visual Studio 6 format which every version since can open and translate fine. You do need a C/C++ version of Visual Studio though, like for example the free Visual C++ Express 2008.

Of course if having played around with this demonstration project you decide you would rather someone else coded your xll, then we would be happy to discuss your requirements. We can code, test, and maintain, or just code, whatever suits the client and the project.

If you require any more information please get in touch.

 

 

Upcoming Events:

25 January 2012 - UK Excel Developer Conference - London


Products for sale:

AltFileSearch

Office 2007 FileSearch replacement logo

New information about the missing FileSearch feature in Office 2007 and details of our pragmatic solution (Current price GBP 30.00)


wsUnprotector

worksheet password remover logo

Instant Excel worksheet protection remover and password recovery (Current price GBP 15.00)


Classic Ribbon Tab

classic ribbon for office 2007 logo

Add Excel 97/2000/2002/2003 compatible menu structure to Excel 2007
(Current Price GBP 10.00)


 

Products coming soon:

Link Manager

(Find and control external links in Excel Workbooks)

Due by Q1 2111.

XLAnalyst Pro

(Excel VBA based spreadsheet auditing tool)

Due before the end of 2111.

  ;-)
This page was last reviewed on December 21, 2011

©Codematic Ltd 1999-2011