7

So, I started with this code:

open System
open System.IO
open FSharpx
open Excel

module ExcelManipulation =

    type BoyICantWaitToUseThis = ExcelFile< @"C:\Users\sean.newham\Documents", "Sheet1", true>
    let example = new BoyICantWaitToUseThis()

...but it doesn't compile because I need an "Excel.dell, Version=2.1.0.0...", I didn't know which Excel.dll that was, so I tried including the Excel Data Reader, which has a dll called "Excel.dll", but alas, this does not appear to have removed the error message.

Any idea what I need here and where I could get it from? Thanks in advance

4

2 回答 2

5

It appears that until about 5 days ago (see here), the excel type provider had a dependency on having Office installed with the office interop files. The newer version depends on the Excel Data Reader.

If you look at the pull request for that change here, you see that the type provider used to reference

<Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

See here for instructions on how to install that.

As an added bonus, you can look at the unit tests in that link for details on how to use the provider.

于 2013-06-28T15:42:13.870 回答
0

我在同一点上试图使用 FSharpx.TypeProviders.Excel。我切换到 ExcelProvider,它开箱即用:

http://fsprojects.github.io/ExcelProvider/

于 2014-09-08T17:56:39.750 回答