0

I have written a program, where I use the Microsoft.Office.Interop.Excel library. Now I want to create (my first) setup of this program. I use the setup project of Visual studio,

Everything works great, but now I have to include the Microsoft.Office.Interop.Excel.dll to my setup, so if Microsoft excel isn't installed to the computer he can also use my program...

How can I do that?

Community
  • 1
  • 1
user3498536
  • 23
  • 1
  • 5
  • 4
    If Microsoft Excel is not installed, he won't be able to use your program even if you include Microsoft.Office.Interop.Excel.dll. – GSerg Jun 17 '14 at 12:22
  • I guess `"Microsoft Excel"` will be required on the machine. You cannot ship `Microsoft.Office.InterOp.Excel.dll` via setup project. – Hassan Jun 17 '14 at 12:22
  • You can use OpenXML SDK to write excel and move away from the office interop – Tsukasa Jun 17 '14 at 12:23
  • This cannot be done unless Excel is installed. Try textcontrol or closexml to accomplish the task. – Sangram Nandkhile Jun 17 '14 at 12:25

2 Answers2

0

In your project, in Solution Explorer, right click your project name --> properties --> Publish --> Application Files. In there you will find all the parts of your app. You might need to check the box "Show all Files" as it hides some things. Find what you need to be included and set it so using the little drop down next to it in the column "Publish Status".

Byron Coetsee
  • 3,533
  • 5
  • 20
  • 31
0

The office interop required office to be installed on the machine.

You can use Open XML http://msdn.microsoft.com/en-us/library/hh180830(v=office.14).aspx or EPPlus http://epplus.codeplex.com/ to work with excel files without installing Microsoft Office.

Basil Farook
  • 191
  • 1