问题描述
我尝试过:
Dim xlpath As String
昏暗的用户As String = HttpContext.Current.User.Identity.Name
xlpath = Server.MapPath(〜\ excelFile \)& EXCEL_PATH.FileName
尝试
Kill(xlpath)
Catch
结束尝试
EXCEL_PATH.PostedFile.SaveAs(xlpath)
Dim strConn As String =Provider = Microsoft.ACE.OLEDB.12.0; &安培; 数据来源=& xlpath& ; &安培; Extended Properties = Excel 8.0;
Dim cnnEXCEL As OleDbConnection = New OleDbConnection(strConn)
//
我只能为此编写代码。
我想要示例代码
What I have tried:
Dim xlpath As String
Dim user As String = HttpContext.Current.User.Identity.Name
xlpath = Server.MapPath("~\ExcelFile\") & EXCEL_PATH.FileName
Try
Kill(xlpath)
Catch
End Try
EXCEL_PATH.PostedFile.SaveAs(xlpath)
Dim strConn As String = "Provider = Microsoft.ACE.OLEDB.12.0;" & "Data Source = " & xlpath & ";" & "Extended Properties = Excel 8.0 ;"
Dim cnnEXCEL As OleDbConnection = New OleDbConnection(strConn)
//
I can write code only for this. I wanted to example code
这篇关于将数据从MS excel导入到SQL MS访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!