http://closedxml.codeplex.com/
http://closedxml.codeplex.com/discussions/375286
var workbook = new XLWorkbook(fileName);
var worksheet = workbook.Worksheets.First();
var range = worksheet.RangeUsed();
var colCount = range.ColumnCount();
foreach (var row in range.RowsUsed())
{
object[] rowData = new object[colCount];
Int32 i = 0;
row.Cells().ForEach(c => rowData[i++] = c.Value);
dtData.Rows.Add(rowData);
}
var workbook = new XLWorkbook(fileName);
var worksheet = workbook.Worksheet(1);
var range = worksheet.Range(worksheet.FirstCellUsed().Address, worksheet.LastCellUsed().Address);
for (int i = 1; i < range.Rows().Count(); i++)
{
var row = range.Row(i);
object[] rowData = new object[dtData.Columns.Count];
int cellCount = row.CellCount();
for (int j = 1; j <= cellCount; j++)
{
var cellValue = row.Cell(j).Value;
rowData[j - 1] = cellValue;
}
dtData.Rows.Add(rowData);
}
Simple OOXML
http://simpleooxml.codeplex.com/