private void Button1_Click(object sender, System.EventArgs e)
{
string strPath="c:\\" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls";
File1.PostedFile.SaveAs(strPath);
string mystring="Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = '"+ strPath +"';Extended Properties=Excel 8.0";
OleDbConnection cnnxls = new OleDbConnection (mystring);
OleDbDataAdapter myDa =new OleDbDataAdapter("select * from [现货$]",cnnxls);
DataSet myDs =new DataSet();
myDa.Fill(myDs);
DataGrid1.DataSource=myDs.Tables[0];
DataGrid1.DataBind();
}