0

I would like to write out some data to classic XLS file.

I have installed MS Office 2013 in the developer PC.

In MS Visual Studio 2015 I see two versions of Microsoft.Office.Interop.Excel are 12 and 14.

And my question is what do I have to install on client PC so application is gonna work?

enter image description here

NoWar
  • 36,338
  • 80
  • 323
  • 498
  • 1
    Don't let a dirty dev machine lead you astray. You should install your app and Office 2013. And [read this](http://stackoverflow.com/questions/21013912/can-i-still-use-microsoft-office-interop-assemblies-with-office-2013/21018418#21018418) to know why you should not be using these. – Hans Passant Dec 06 '16 at 13:32
  • @HansPassant Would you mind to suggest much clear solution to work with MS Excel file please? Please, make it as an answer. – NoWar Dec 06 '16 at 14:15
  • 1
    I would just have to repeat what I already posted in the linked answer. "Don't do it" is about the most straight-forward advice you could ever possibly get. If you don't understand *why* that is the correct advice then consider asking a question about it, watch the video first. – Hans Passant Dec 06 '16 at 14:36

1 Answers1

0

You don't install the PIAs. They should already be present on the machine (as part of the Office installation) and usually in the GAC in order to be loaded at runtime.

toadflakz
  • 7,764
  • 1
  • 27
  • 40
  • Hmm... Have I install MS Office 2013 and that is all? O lets say like this have I use Microsoft.Office.Interop.Excel 14 and install MS Office 2013 on client PC? – NoWar Dec 06 '16 at 12:56
  • You need to use the same version as your deployed environment as the PIAs are not compatible. – toadflakz Dec 06 '16 at 12:57
  • Would you mind to clarify if the Microsoft.Office.Interop.Excel 14 corresponds to MS Office 2013 as well? – NoWar Dec 06 '16 at 13:05