from code examples at http://msdn.microsoft.com
Beware, though, that the code has never been thoroughly tested. I ran it, and it did not crash -- that's almost all I can say. I even do not know if it leaks any memory. Use it
at your own peril.The tar file contains a sample Excel sheet, and the sources of two DLLs: a COM DLL which interfaces with Excel, and a Haskell DLL which is invoked by the COM DLL.
You will need Visual Studio 7.1 to build the COM DLL.The Haskell DLL exports one function, hString2String, which takes a C-style string,
and returns the reverse of it. To build the Haskell DLL, run build.bat.To build (and register) the COM DLL, open Excel2Haskell.sln in Visual Studio, and hit Build. Once the two libraries are built, open Worksheet.xls and see how the function is invoked.
Note that the COM DLL can be used not only by Excel, but by any other program or script that understands COM. For example, VBA scripts in Word, or VB and Javascript run by Wscript or
Cscript. Hope this helps. Regards, Cyril ___
Excel2Haskell.tar.bz2
Description: Binary data
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
