-
Notifications
You must be signed in to change notification settings - Fork 842
Closed
Description
I am trying to open Excel 2016 application:
open Microsoft.Office.Interop
[<EntryPoint>]
let main argv =
let app = new Excel.ApplicationClass(Visible = true)
0However, I get the following error:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
My project contains following COM reference:
<ItemGroup>
<COMReference Include="Microsoft.Office.Excel.dll">
<Guid>00020813-0000-0000-c000-000000000046</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>9</VersionMinor>
<WrapperTool>tlbimp</WrapperTool>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
</COMReference>
</ItemGroup>Also tried:
<ItemGroup>
<COMReference Include="Microsoft.Office.Excel">
<Guid>00020813-0000-0000-c000-000000000046</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>9</VersionMinor>
<WrapperTool>primary</WrapperTool>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</ItemGroup>But this didn't help either. Moreover, when I type app. on the next line, I get the following:
It's strange that F# tries to load Excel 2013. It was never installed on my system.
Related information
Provide any related information (optional):
- Windows 10 x64 Pro 1909
- .NET 5.0.100-preview.7.20366.6
- Visual Studio 2019 Preview 16.7.0 Preview 6.0
Metadata
Metadata
Assignees
Labels
No labels
