Click here to Skip to main content
15,914,070 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Windows Service Functionality Pin
DaveAuld22-May-10 23:46
professionalDaveAuld22-May-10 23:46 
GeneralRe: Windows Service Functionality Pin
VikashGohil23-May-10 20:26
VikashGohil23-May-10 20:26 
QuestionBest data structure in VB .NET 4.0 ?! Pin
Agarwaen5922-May-10 8:03
Agarwaen5922-May-10 8:03 
AnswerRe: Best data structure in VB .NET 4.0 ?! Pin
Luc Pattyn22-May-10 8:42
sitebuilderLuc Pattyn22-May-10 8:42 
QuestionCopy Excel Data into Access Database Table. Pin
jeshra27922-May-10 3:52
jeshra27922-May-10 3:52 
AnswerRe: Copy Excel Data into Access Database Table. Pin
DaveAuld22-May-10 4:02
professionalDaveAuld22-May-10 4:02 
GeneralRe: Copy Excel Data into Access Database Table. Pin
Dalek Dave22-May-10 4:17
professionalDalek Dave22-May-10 4:17 
GeneralRe: Copy Excel Data into Access Database Table. Pin
jeshra27922-May-10 4:51
jeshra27922-May-10 4:51 
I have gone through this, and I tried to implement somehow. The implementation is as follows:

// first connected xl datasheet:

Dim filename As String = "C:\Student.xls"

Dim con As String

con = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & filename & ";" & "Extended Properties=Excel 8.0;"

Dim connection As OleDbConnection = New OleDbConnection(con)

connection.Open()

// now copying the excel column into access database table columns:

Dim cmd As New OleDbCommand
cmd.Connection = connection

Try

cmd.CommandText = "SELECT * INTO [MS Access;Database=C:\alldata.mdb].[Record] FROM [Sheet1$]"
cmd.ExecuteNonQuery()
connection.Close()
MsgBox("The Import is Compelte")

Catch ex As Exception
MsgBox("Import Failed, correct Column name in the sheet!")
End Try

While executing I am getting following error:

The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly.

I am using Microsoft office 2007 with Access 2007 database.

Please tell me how to solve this?

Regards,
R.S.
GeneralRe: Copy Excel Data into Access Database Table. Pin
DaveAuld22-May-10 5:02
professionalDaveAuld22-May-10 5:02 
GeneralRe: Copy Excel Data into Access Database Table. Pin
jeshra27922-May-10 5:40
jeshra27922-May-10 5:40 
GeneralRe: Copy Excel Data into Access Database Table. Pin
DaveAuld22-May-10 20:48
professionalDaveAuld22-May-10 20:48 
GeneralRe: Copy Excel Data into Access Database Table. Pin
jeshra27923-May-10 18:53
jeshra27923-May-10 18:53 
QuestionCompare two scanned images! Pin
FeRtoll21-May-10 8:26
FeRtoll21-May-10 8:26 
AnswerRe: Compare two scanned images! Pin
Dave Kreskowiak21-May-10 9:15
mveDave Kreskowiak21-May-10 9:15 
GeneralRe: Compare two scanned images! Pin
FeRtoll21-May-10 11:42
FeRtoll21-May-10 11:42 
GeneralRe: Compare two scanned images! Pin
FeRtoll21-May-10 13:34
FeRtoll21-May-10 13:34 
GeneralRe: Compare two scanned images! Pin
Dave Kreskowiak22-May-10 14:45
mveDave Kreskowiak22-May-10 14:45 
GeneralRe: Compare two scanned images! Pin
FeRtoll23-May-10 0:07
FeRtoll23-May-10 0:07 
GeneralRe: Compare two scanned images! Pin
FeRtoll23-May-10 10:33
FeRtoll23-May-10 10:33 
GeneralRe: Compare two scanned images! Pin
Dave Kreskowiak23-May-10 18:08
mveDave Kreskowiak23-May-10 18:08 
GeneralRe: Compare two scanned images! Pin
FeRtoll23-May-10 22:12
FeRtoll23-May-10 22:12 
Questioninfragistics ultrawingrid tabbing problem Pin
soterios21-May-10 3:22
soterios21-May-10 3:22 
AnswerRe: infragistics ultrawingrid tabbing problem Pin
Dave Kreskowiak21-May-10 6:57
mveDave Kreskowiak21-May-10 6:57 
QuestionCD (data or music) or DVD Pin
JR21221-May-10 0:10
JR21221-May-10 0:10 
AnswerRe: CD (data or music) or DVD Pin
JHizzle21-May-10 0:46
JHizzle21-May-10 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.