我的上传文件代码是
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strFullName As String = Me.File1.PostedFile.FileName
        Dim strFileName As String = strFullName.Substring(strFullName.LastIndexOf("\") + 1)
        thefile = strFileName
 File1.PostedFile.SaveAs(savepath + strFileName)    End Sub
导入文件代码是:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim dt As New DataTable
        Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + savepath + thefile + ";Extended Properties=Excel 8.0;"
        Dim sql As String = "Select * from [sheet1$]"
        Dim adp As New OleDb.OleDbDataAdapter(sql, strConn)
        ' Dim dt As New DataTable
        ' Try        adp.Fill(dt)
....