I'm afraid all I can offer is condolences. I tried what you tried, with the same results. I also tried downloading and installing Owc11.exe from the Microsoft site. It installed the Office 2003 Web Interop whatever - I can see it in the Control Panel - but I was only able to find one Owc11.dll on my machine. I moved that to the F# folder and it failed with a bad header or some such.

No luck no matter what I tried.

I'm not being very specific here, since this isn't my development machine. If anyone from Microsoft wants more specifics, I can get them.

Sorry I couldn't help. I, too, have an interest in plotting and I'm not wild about writing my own stuff.

Bob

By on 6/1/2008 5:55 PM ()

Hi guys,

Here's that I did to make it work from the command line:

1) I downloaded the Office2003 Add-in stuff from [link:www.microsoft.com]
2) I modified your source code slightly:

#light

#r "FSharp.Plot.dll"
#r "FSharp.Plot.Excel.dll"

open Microsoft.FSharp.Plot.Excel
open Microsoft.FSharp.Plot.Interactive
let ps = [| (1.,"c"); (-2.,"p") |]
plot (Bars(ps))

let xs = [| 1.0 .. 20.0 |]
let ys = [| 2.0 .. 21.0 |]
let pp= plot(Area(xs,ys))

System.Console.ReadKey()

2) I ran the following script to build and execute the code:

copy /y "C:\Program Files (x86)\FSharp-1.9.3.14\bin\FSharp.Plot.dll"
copy /y "C:\Program Files (x86)\FSharp-1.9.3.14\bin\FSharp.Plot.Excel.dll"
copy /y "C:\Program Files (x86)\FSharp-1.9.3.14\bin\FSharp.Plot.Neutral.dll"
copy /y "C:\Program Files (x86)\FSharp-1.9.3.14\bin\FSharp.Plot.XCeed.dll"

set FSC=C:\Program Files (x86)\FSharp-1.9.3.14\bin\fsc.exe
set FSCOPTS=--platform x86 -r "C:\Windows\assembly\GAC\Microsoft.Office.Interop.Owc11\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Owc11.dll"

"%FSC%" %FSCOPTS% plot.fs
plot.exe

When I run the script, I am able to compile and run the app.

Few things to keep in mind:
- I am on an x64 machine: for that reason, you see the "Program Files (x86)" in my paths
- The office components we are referring here are 32bit/x86, so I had to compile with "--platform x86"

I'll try to see what needs to be changes in order to get the code compile from Visual Studio later.

-Matteo (F# Team)

By on 6/1/2008 8:43 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper