View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RapidXLL_NET RapidXLL_NET is offline
external usenet poster
 
Posts: 6
Default Building an XLL from C / C++

Many people have trouble with buiding XLL ( Excel Worksheet Functions )
from C / C++.

The Microsoft Excel API can be hard to use and the framework template
from MicroSoft has a bug.
It it tries to convert the C strings " some string" into LPSTR by the
updating the first character at runtime. This causes the XLL to fail.
The solution is to make a copy of the string and then update the first
character with the proper LPSTR size. This is what you then pass to
xlregister.

However, the easiest way to build XLLs from C/C++ is to use RapidXLL.
http://www.RapidXLL.net

One simple tag exports the function in an XLL. It also automatically
builds a .NET wrapper for use in winform applications, and creates html
user documentation for your addin.