我已经在Windows上下载了F#压缩分发(即没有安装程序),并且在使用ExcelDna时遇到了困难。ExcelDna和独立的F#安装
当我将FSharp.Core.dll和powerpack复制到ExcelDna文件(xxx.dna和xxx.xll)的目录中,并将代码用于dna文件(参见下文)时,它不会工作(虽然没有错误信息)。
<DnaLibrary Name="FSharp Sample" Language="F#">
<![CDATA[
namespace Foo
module Bar =
open ExcelDna.Integration
let sayhello() = "Hello from F#"
[<ExcelFunction(Category="FSharp Functions", Description="FSharp function to add numbers")>]
let add x y = x + y
let rec factorial = function
| x when (x > 1.0) -> (floor x) * factorial (x - 1.0)
| _ -> 1.0
]]>
</DnaLibrary>
然而,它确实与该目录中的动态链接库的工作,并使用一个F#-compiled库的引用,如:
<DnaLibrary>
<ExternalLibrary Path="MyExcelDna.dll" />
</DnaLibrary>
其他语言(C#& VB)似乎做工精细。
有没有人使用ExcelDna工具与压缩的F#分布?任何人都不知道什么可能是错的?
非常感谢您的帮助。
嗨,你是否解决了这个问题到底 ? – nicolas 2013-01-21 19:55:15