5

I'm trying to develop a new app to process excel files.As far as i know -in order to use the Built in Excel Manipulation functionality i need to have Microsoft Office installed (i'm i right)?

Or can i just download the dll Microsoft.Office.Interop.Excel.dll,add a reference and make the solution work on every machine?

techno
  • 6,100
  • 16
  • 86
  • 192
  • You don't need Excel or Excel Interop to process Excel files. Use a library like [EPPlus](https://www.nuget.org/packages/EPPlus/). That's the very reason the `xlsx` format replaced `xls` 10 years ago - to allow programs to generate `xlsx` files without requiring Excel – Panagiotis Kanavos Jul 05 '17 at 09:15
  • @PanagiotisKanavos Thanks for the info.Currently im using `spreadsheetlight` to access excel documents.But i'm having a hard time iterating through sheets .. can i solve this problem https://stackoverflow.com/questions/44885027/get-names-of-all-columns-in-excel-sheet-in-spreadsheetlight/ easily using EPPlus? – techno Jul 05 '17 at 12:51

2 Answers2

9

Yes, you are right. You need Excel to be installed to use the Excel Manipulation feature with Microsoft.Office.Interop.Excel.dll.


If you need to edit only .xlsx files, then you can use libraries like EPPlus. These libraries do NOT need Excel to be installed.

Dávid Molnár
  • 10,673
  • 7
  • 30
  • 55
  • Or no, you don't need Excel at all. You can generate/manipulate Excel files with the Open XML SDK, libraries like EPPlus or, worst case, the Jet OLEDB Provider – Panagiotis Kanavos Jul 05 '17 at 09:17
  • Yeah, that's right, but the question was if you need Excel to use the `Interop` assembly... – Dávid Molnár Jul 05 '17 at 10:00
  • Thanks .. which library you suggest to easily solve this problem https://stackoverflow.com/questions/44885027/get-names-of-all-columns-in-excel-sheet-in-spreadsheetlight/ .Currently im using spreadsheetlight .. it seems that there is no straight forward way to meet my requirement using spreadsheetlight. – techno Jul 05 '17 at 12:52
0

Question TLDR: Yes. You need to have Excel installed or an exception will be thrown.

Samuel S
  • 26
  • 5