1

I am working on a WPF 4.0 application which uses the Microsoft Office Interop to read and write to Excel files. But I am facing a scenario where I need to read/write data from/to Excel files on systems that do not have Office installed.

This is somewhat a repeat of this question. The only reason I reposted this question because the earlier post was 3 years old and I just wanted to know if there is a better way available right now.

The requirement is that I need to write into and save the file as .xls/.xlsx formats and read from the same. I am supporting both the format using the Interop right now.

  • Buying a license is not an option.
  • Installing Excel is not an option.
  • Need to Support Read/Write from .xls/.xlsx formats.
  • Easy to Implement as I am a little behind schedule. Would not be able to give a lot of time on implementation.
  • Need a solution that is trustworthy and robust, meaning it should be something that you have used personally or have a good feedback about.
  • Would prefer a solution that can cater to both read/write and can support both .xls/.xlsx formats. If something like this doesn't exist, can use different solutions, but all the above points would apply to them individually.
  • Don't need suggestions, but more like guidance.

Please do not vote to close this question as duplicate as the other ones do not give a concrete solution. There are too many suggestions. I need a solution that you are confident about as this application goes into final build soon and if I do not get any robust solution to this, we might end up releasing as is.

Community
  • 1
  • 1
Shakti Prakash Singh
  • 2,414
  • 5
  • 35
  • 59

2 Answers2

2

If you can live without the xls-support (only xlsx) then you should most definitely look at the OpenXML SDK:

http://www.microsoft.com/en-us/download/details.aspx?id=5124

I doesn't require Excel or any extra license, you can do both read and write, I would say that it is robust and it comes with the Productivity Tool which is great. On the other hand, the API isn't that intuitive and you can't process .xls-files.

granaker
  • 1,318
  • 8
  • 13
2

I suggestyou ExcelPackage: Office Open XML Format file creation

http://excelpackage.codeplex.com/

JSJ
  • 5,653
  • 3
  • 25
  • 32