Base Excel xll project

I have finally uploaded a base xll project to the traditional place.

I have put a very brief guide to it there too.

I got caught up in a bit of a quandary due to various incompatibilities.

Basically the Microsoft xll SDK for Excel 97 is simpler and easier to understand, but only works with VC6.0 or earlier (using the simple approach I use). This is generally the one I use, because there is less risk of additional run-time dependencies.

One of the SDK functions takes a string and modifies it by adding the byte count to it. You can even pass this function a fixed string as in “Hello”, and it will modify it. VC6 allowed that, VC2003 onwards don’t. There are (at least) two possible fixes

  1. put the hello in a variable and then pass the variable
  2. change the function to create a new string and return that (I chose this as I think it keeps the actual xll code simple)

The Microsoft xll SDK for 2007 is more complex because it covers the new features introduced in that version, and is based on VC2005 or newer.

Actually setting up Visual Studio C++ to work with the SDK is a bit of a step if you are new to it, so in the end here is what I have done:

I have changed the function in the 97 SDK that broke more recent compilers, and I have included that SDK with the base project. I have included a VC6,0 project file and a VC2008 one so it can be opened and worked with with VC2008 Express immediately, with no set up required.

I wouldn’t normally modify or redistribute someone else code but in this case I think it makes it so much easier for people to get going with this technology I think it makes sense. I did have a quick ratch around to make sure that wasn’t a breach of the SDK licensing but nothing jumped out at me. If its a problem I’ll take it down.

Of course its just barely tested, so if you have any problems then let me know




Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: