大家好,
请建议如何摆脱错误
"无法找到可安装的ISAM"当我尝试从ASP.NET应用程序连接到一个Excel文档。
我读了它,并evryone说,因为连接字符串,如果我使用jet.4.0和扩展属性被设置为Excel 8.0,它应该工作,但我仍然得到erorr。
代码为:
Protected Function ExcelConnection() As OleDbCommand
Dim xConnStr As String = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = C:\Users\Arnold\Desktop\Annexcelweb\ExcelImport.xlsx;Extended Properties=Excel 8.0;HDR = YES;IMEX = 1"
' create your excel connection object using the connection string
Dim objXConn As New OleDbConnection(xConnStr)
objXConn.Open()
' use a SQL Select command to retrieve the data from the Excel Spreadsheet
' the "table name" is the name of the worksheet within the spreadsheet
' in this case, the worksheet name is "Members" and is expressed as: [Members$]
Dim objCommand As New OleDbCommand("SELECT * FROM [Sheet1$]", objXConn)
Return objCommand
请帮助..
谢谢。