0

Ok, here is what I'm looking for. I'm developing an application that will be dealing with Excel files ONLY (.xls mainly but might be upgraded to .xlsx) ... For now, I'm looking to deal with 2003.

In my application, I have an "Open" btn that the user clicks and locates the file. I have done this.

But know, I don't know how to deal with the file after I located it. I want to delete some rows/columns as a beginning, then I want to do some sorts and calculations. If anyone can just put me on the road, I believe I can run through it then :)

Thanks in advance :)

sikas
  • 5,435
  • 28
  • 75
  • 120
  • You can see this link :) http://siddharthrout.wordpress.com/vb-net-and-excel/ I am sure you will be able to easily convert it to C# – Siddharth Rout May 20 '12 at 10:16

4 Answers4

1

When dealing with excel, there are bascially two options

1) The office interop assemblies Here is an article on MSDN
2) A fully manged library of some sort. (Search on codeplex/google or similar)

Here is a similar question on SO read write excel file on server

Community
  • 1
  • 1
iamkrillin
  • 6,798
  • 1
  • 24
  • 51
1

For excel 2003 and earlier versions (xls) you can use NPOI, it's open soruce and works well, here are some examples to get you started :

http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html

Antonio Bakula
  • 20,445
  • 6
  • 75
  • 102
0

You can use Microsoft.Jet.OLEDB.4.0 driver to work with xls files. See this question, for example.

Community
  • 1
  • 1
user1096188
  • 1,809
  • 12
  • 11
0

if you are just using office 2007, you can use http://epplus.codeplex.com

user287107
  • 9,286
  • 1
  • 31
  • 47