DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Martin S Guest

    Import excel spreadsheet to access97 database


    Hi!!
    I wonder if it is possible to import data from an excel spreadsheet into
    a normalised access97 database with alot of tables in a way that the data
    in the spreadsheet will be inserted into the correct tables in the database?
    and if so, how? I have been trying to use an ASP-script with not much success.

    /Martin

  2. #2
    Paul Clement Guest

    Re: Import excel spreadsheet to access97 database

    On 1 Aug 2001 06:21:29 -0700, "Martin S" <martinsz@hotmail.com> wrote:

    ¤
    ¤ Hi!!
    ¤ I wonder if it is possible to import data from an excel spreadsheet into
    ¤ a normalised access97 database with alot of tables in a way that the data
    ¤ in the spreadsheet will be inserted into the correct tables in the database?
    ¤ and if so, how? I have been trying to use an ASP-script with not much success.
    ¤
    ¤ /Martin

    I don't know the structure of your Excel Workbook you can import using SQL and DAO or ADO.

    Sub ExportExcelToAccess()

    Dim cnn As New ADODB.Connection
    Dim sqlString As String

    cnn.Open _
    "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=D:\My Documents\db1.mdb;" & _
    "Jet OLEDB:Engine Type=4"

    sqlString = "SELECT * INTO [tblExcel] FROM [Excel 8.0;DATABASE=D:\My
    Documents\Test.xls].[Sheet1$A37]"

    cnn.Execute sqlString

    End Sub


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links