I want to load an Excel spreadsheet up in VB6 and save some data back out to my database.
Using this...
Im trying to select a range of cells. In Excel the range of cells would look like A1:I45,GL1:HV45
I named that range in the spredsheet to Test and saved it out but im getting an error saying "Could not find the object Data_05_2007$Test"
I can load the whole spreadsheet up if i take the Test bit off the string so it knows the spreadsheet is there. Ive also tried removing the name Test and entering the range so it looks like [Data_05_2007$A1:I45,GL1:HV45] and that doesnt work either.
So if anyone has imported spreadsheets with ODBC before and got it working could they tell me how
Using this...
Code:
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=c:\Temp\TheBigOne.xls;" & "Extended Properties=""Excel 8.0;IMEX=1;HDR=No;"""
strSQL = "Select * from [Data_05_2007$Test]"
Set rsBaseData = New ADODB.Recordset
rsBaseData.Open strSQL, adoConn, adOpenStatic, adLockOptimistic
Im trying to select a range of cells. In Excel the range of cells would look like A1:I45,GL1:HV45
I named that range in the spredsheet to Test and saved it out but im getting an error saying "Could not find the object Data_05_2007$Test"
I can load the whole spreadsheet up if i take the Test bit off the string so it knows the spreadsheet is there. Ive also tried removing the name Test and entering the range so it looks like [Data_05_2007$A1:I45,GL1:HV45] and that doesnt work either.
So if anyone has imported spreadsheets with ODBC before and got it working could they tell me how
