public DataTable ReadExcelToTable(string filepath)
{
string excelfilePath = Server
Excel
Excel
object oMissing = System
Excel
//Excel
int sheetint = myBook
Excel
int rowsint = mySheet
int columnsint = mySheet
System
for (int i =
{
dt
}
DataSet myDs = new DataSet();
myDs
DataRow myRow;
myDs
for (int i =
{
myRow = myDs
for (int j =
{
Excel
string strValue = r
string aa = strValue;
string columnname =
myRow[columnname] = strValue;
}
myDs
}
return myDs
}
From:http://tw.wingwit.com/Article/program/net/201311/12028.html