1

I'm trying to Export an Excel file from a Windows Form (C#.NET), as the application is installed on server. For most of the clients it is working fine but some client machines are getting following error after clicking export button:

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.Access Denied

Those client machines are having office 2013 and 2007 installed. In my PC I got office-365, and its working fine.

James Z
  • 12,209
  • 10
  • 24
  • 44
  • 1
    What do you mean by saying the Windows Forms application is installed on the server (but used from clients)? Is that some sort of ClickOnce deployment? Version 15 is Office 2013, so if the clients have that installed like you are saying, then you should look into exactly how the application is transferred and launched on their computers, because otherwise it should work. – GSerg Dec 27 '18 at 13:00
  • You will have to verify at least two things on the machines producing the error: (A) Is the Microsoft.Office.Interop.Excel assembly present and can be found by your program on those machines? If the assembly is present and at the correct location, is it actually the version 15.0.0.0? Your program wants/needs specifically this version. So, you will need to make sure that this specific version 15.0.0.0 of the Microsoft.Office.Interop.Excel assembly is present on the client machines... –  Dec 27 '18 at 13:05
  • 1
    Possible duplicate of [Could not load file or assembly 'Office, Version=15.0.0.0'](https://stackoverflow.com/questions/32399420/could-not-load-file-or-assembly-office-version-15-0-0-0) –  Dec 27 '18 at 13:06
  • 1
    @elgonzo The question has already been closed as a duplicate of [Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0](https://stackoverflow.com/q/14527305/11683) which is essentially the same as yours, and I have reopened it because the OP is saying the matching Office version is installed and because the error is `Access denied` rather than `cannot find the file specified` or `manifest definition does not match the assembly reference`. – GSerg Dec 27 '18 at 13:11

0 Answers0