程式碼:
using System; using EXCEL = Microsoft.Office.Interop.Excel; namespace CallExcelFunction { class Program { static void Main(string[] args) { EXCEL.Application excel = new EXCEL.Application(); Console.WriteLine(excel.WorksheetFunction.Log(1024,2)); Console.Read(); } } }
執行結果:
參考資料:
http://alvincho.blogspot.tw/2009/04/c-excel-black-scholes.html
http://msdn.microsoft.com/zh-tw/library/ms173186(v=vs.80).aspx