how to read the database from excel and save it in database

saran

New member
Local time
Today, 07:39
Joined
Sep 22, 2008
Messages
5
I want the logic to read the data from Excel sheet and save it into the Ms access database.Plz help me.


Thanks
 
If you are using 2003, you can connect the spreadsheet as if it where a table.

or you can approach the spreadsheet using code:
Code:
    Dim appExcel     As Excel.Application
    Dim wbExcel      As Workbook
    Dim wsExcel      As Worksheet

    Set appExcel = New Excel.Application
    With appExcel
        .Visible = blnVisible
        Set wbExcel = .Workbooks.Open("c:\temp\file.mdb")
    End With
    Set wsExcel = wbExcel.Sheets("Sheet1")
Using the wsExcel object, you can read every cell in the selected sheet.

Enjoy!
 

Users who are viewing this thread

Back
Top Bottom