Hi
I get the following error: "The Microsoft Jet database engine could not find the object 'TextImportSheet'. Make sure the object exists and that you spell its name and the path name correctly."
The code:
My excel sheet is called TextImportSheet and is definitly spelled correctly. (I only have 1 sheet)
Any help would be appreciated.
I get the following error: "The Microsoft Jet database engine could not find the object 'TextImportSheet'. Make sure the object exists and that you spell its name and the path name correctly."
The code:
VB.NET:
Dim ExcelConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\logs\book1.xls;Extended Properties=""Excel 8.0;HDR=NO;""")
ExcelConnection.Open()
Dim ImportCommand As New System.Data.OleDb.OleDbCommand("INSERT INTO [TextImportSheet] (SwipeCard,FirstName,LastName,Faculty,Degree,IDNr,EndDate,mail) SELECT * FROM [Text;HDR=NO;DATABASE=c:\logs\import].[output.txt]", ExcelConnection)
ImportCommand.ExecuteNonQuery()
ExcelConnection.Close()
My excel sheet is called TextImportSheet and is definitly spelled correctly. (I only have 1 sheet)
Any help would be appreciated.