+ Reply to Thread
Results 1 to 3 of 3

Newbie : Oracle Data to Excel

  1. #1

    Newbie : Oracle Data to Excel


    I am using Excel 2002.

    I wanted my VBA code to connect to Oracle, do a select statement, and
    get data. Then I wanted to put that data into a spreadsheet.

    My question is, how do I connect to Oracle via Excel. Is there an
    example that I can get that shows me how to do this?

    ...


  2. #2
    Dave M.
    Guest

    RE: Newbie : Oracle Data to Excel

    I am also a newbie who just went through this same thing. I have never
    worked with Oracle but I'm sure it would be very similar. You will need to
    install an ODBC driver into Excel for your database then you will be able to
    Import External Data Using Excel. After the driver is installed you will be
    able to select your tables and write your query. Good Luck!



    "[email protected]" wrote:

    >
    > I am using Excel 2002.
    >
    > I wanted my VBA code to connect to Oracle, do a select statement, and
    > get data. Then I wanted to put that data into a spreadsheet.
    >
    > My question is, how do I connect to Oracle via Excel. Is there an
    > example that I can get that shows me how to do this?
    >
    > ...
    >
    >


  3. #3
    Jean-Yves
    Guest

    Re: Newbie : Oracle Data to Excel

    Hio all,


    Look for ADO in this group. Example were posted before.
    If you don't, please repost.
    Regards
    JY

    'First make a reference via Tool/References .... To Microsoft ActiveX Data
    Objects 2.x

    Sub test()
    Dim connMdb As ADODB.Connection
    Dim recMdb As ADODB.Recordset
    Dim strStatus As String

    Set connMdb = New ADODB.Connection
    Set recMdb = New ADODB.Recordset
    "open a connection to the DB
    connMdb.conn.Open "Provider=MSDAORA;Data Source=theDB", "userID", "password"
    recMdb.Open "SELECT Name, Surname FROM STAFF ;", connMdb, adOpenForwardOnly,
    adLockOptimistic
    Do while recMdb.EOF = False
    debug.print recmdb.fields("Name").value & " " &
    recmdb.fields("Surname").value
    Loop
    recMdb.Close
    Next cl

    connMdb.Close
    Set recMdb = Nothing
    Set connMdb = Nothing
    End Sub

    "Dave M." <Dave [email protected]> wrote in message
    news:[email protected]...
    > I am also a newbie who just went through this same thing. I have never
    > worked with Oracle but I'm sure it would be very similar. You will need

    to
    > install an ODBC driver into Excel for your database then you will be able

    to
    > Import External Data Using Excel. After the driver is installed you will

    be
    > able to select your tables and write your query. Good Luck!
    >
    >
    >
    > "[email protected]" wrote:
    >
    > >
    > > I am using Excel 2002.
    > >
    > > I wanted my VBA code to connect to Oracle, do a select statement, and
    > > get data. Then I wanted to put that data into a spreadsheet.
    > >
    > > My question is, how do I connect to Oracle via Excel. Is there an
    > > example that I can get that shows me how to do this?
    > >
    > > ...
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1