C # read excel sheetheet

Can someone help me read a simple Excel spreadsheet in a C # application? I would like to be able to iterate through each row and have a descriptor for each of the columns.

Thanks, core.

+5
source share
6 answers

This is the easiest method I found:

Create Excel file (.XLS and .XLSX) with C #

+2
source

The general method is to use Excel COM Interop. Fast google will find many tutorials. There is one for creating a sheet - it should point you in the direction (reading is almost the same).

ADO.Net. , Excel (.. ), , .

+2

Excel 2007 2010 ( ooxml), Open XML SDK 2.0 Microsoft Office ( , MS).

+1

Excel COM Interop , - Excel. , , , Aspose.Cells( , ). , .

0

I have used ADO.NET and Jet in the past. Be warned that if you have columns that are clearly not of the same type, you will see strange things. Jet tries to assign a data type to a column based on the first few values. The best part is that you can query the table as a table.

0
source

All Articles