Reading data from Excel using c# - HELP Please!!!

Sep 23 2009 4:42 AM

Hi guys (1st time poster here)

 

I am using Visual Studio 2008 and Microsoft Office 2007.

To start off simple, I want read and extract data from a specific cell in a excel worksheet using c# in visual studio as a class program.

 

So for example, in a already created spreadsheet (located in a specific directory), the number 100 is in the cell A1 (in sheet1). I want to read cell A1 using c# in VS2008 and add it into an array as a string (I know it is only 1 value but it will build up to make a full array) so the array includes the string "100".

 

As much help as possible is appreciated, and also help with what references to use; adding references i.e. using Excel = Microsoft.Office.Interop.Excel;

 

Thanks.


Answers (3)