Search code examples
c#.netexceloffice-interopexcel-interop

Replace use of excel interop


I have a system which does heavy use of excel interop. this is problematic , because it is deployed at many client sites, each with his own unique operating system, office version , regional settings etc... This causes me headeaches like this one: OleDB & mixed Excel datatypes : missing data

It is hard to reproduce or solve this bugs. Also, I can't run my system as a windows service, because of known issues with using interops at a windows service.

So what I'm looking for is a tool which will allow me for excel import\export without me using the interop. it should ideally:

  1. Support excel 2003 - 2013 and hopefully upcoming versions
  2. Support getting values and writing values to excel (of course)
  3. Support styling operations (font , range of cells, borders, etc...)
  4. Support use of graphs in excel
  5. Support macros activation.
  6. support csv files

This is all I can think of for now :-)

Would appreciate any help. Thanks.


Solution

  • Office Interop can cause a compatibility problems, you need to have a valid office license installed and... is slow...

    Probably the best Open solution is to use the Open XML SDK. It's well documented and Microsoft encourages the developers to use this approach over Interop.