This is all fairly easy to do with ODBC and VBA in Excel.
You should download the MDAC SDK from MSDN "mdac28sdk.msi", as that is where you will find the help files with VBA examples that contain everything you need for the database side.
Whatever you need to do in Excel can be found by recording a macro doing what you need to manually and then looking at what objects, methods and properties are referenced in the recording and reading their help
Here's a sample connecting to an Oracle DB and fetching a SQL into a recordset.
Code:
Dim dbConnection As New ADODB.Connection
Dim dbRecordset As New ADODB.Recordset
Dim dbErrors As ADODB.Error
Dim dbFieldNames As ADODB.Fields
Dim dataArray() As Variant
dbConnection.Open "Provider=MSDAORA;Data Source=" & DB & ";User ID=" & UID & ";Password=" & PWD & ";"
If dbConnection.State = adStateOpen Then
Application.StatusBar = "Database is executing the query"
dbRecordset.CursorLocation = adUseServer
dbRecordset.Open SQLtxt, dbConnection, adOpenForwardOnly, adLockReadOnly, adCmdText
Set dbFieldNames = dbRecordset.Fields
If dbRecordset.BOF And dbRecordset.EOF Then ' no rows in recordset
...