Excel can be extended using .Net for quite a while now... this even allows you to add to the functions within excel.
Writing Custom Excel Worksheet Functions in C# http://blogs.msdn.com/b/gabhan_berry/archive/2008/04/07/writ...
How To Create an Excel Macro by Using Automation from Visual C# .NET http://support.microsoft.com/kb/303872/en-us
How To Create an Excel Macro by Using Automation from Visual Basic .NET http://support.microsoft.com/kb/303871/EN-US