On the assunmption that the Excel file is in a database type format(i.e. fieldname is first row, data in following rows), then I think I would extract the data by connecting using ADO whilst also connecting to Oracle using another ADO connection to insert the data
I have done a similar thing the opposite way and it all worked fine
I think it might be best to use ADO via ODBC, so first set up odbc connections to both the excel file and the Oracle db
The connection then looks something like this
Private Sub connecttoExcel()
Dim cnexcel As New ADODB.Connection 'connection #1 to excel
Dim rsexcel As ADODB.Recordset 'recordset to work with
cnexcel.Open ("DSN=Excel" 'reference to the excel odbc dsn
Set rsexcel = cnexcel.Execute("select fieldname from ['sheetname$']"' replace fieldname and sheetname with those in your file (I think the sheetname needs to be formatted as shown)
end sub
Then do a similar connection to the oracle db then maniuplate the data between the two connections
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.