Jun 7, 2012

Work with Excel Workbook in .NET

From day on,I will also post some advanced technology .NET at the same time as I begin in .NET step by step. An advanced technology is to work with Excel in .NET. First question to answer how many ways and how to work with Excel in .NET.
Work Excel workbook in .NET
There are three different ways to work with Excel workbook in C#.  Of course, every way have its pros and cons which I will analyse below.
1. Use Excel InterOp Objects. This way is pretty easy for beginner, which is why I start with. Meanwhile,this way requires you to installed  Excel  in the development environment. This is a binding if you are going to make a product which is to be distributed.
2. Take use of OleDb data providers for Excel which is free with Windows. But notice that there is one limitation, you can access only data using this technique. You cannot do formatting through this technique.
3.Get a 3rd party library involved. It will  act as an interface between your program and the Excel.  Generally speaking, this way is very easy and powerful to develop, but it costs.

In my following post, normal I will ignore the 3rd party library unless it is necessary. 

No comments:

Post a Comment