ignored columns controlling vb6 mislay excel


i am perplexing mislay list values an comparison (2003) spreadsheet controlling vb6, outcome needs stored (adodb) recordset. list looks this:




name option.1 option.2 option.3 option.4 option.5 option.6
-----------------------------------------------------------------
name1 2 3 4
name2 2 3 4
name3 2 3 4
name4 2 3 4
name5 2 3 4
name6 2 3 4
name7 2 3 4
name8 2 3 4
name9 2 3 4 5 6 7


upon joining executing query "select * [sheet1$]" even column-specific, "select [option#6] [sheet1$]" (see footnote 1) looping by results, i am given null values quarrel name9, option.4 --> option.6 rather repremand values 5, 6, 7. seems tie spreadsheet controlling "best guess" last current list boundary are, wholly takes set array rows account.



to bond spreadsheet, i have attempted both tie providers microsoft.jet.oledb.4.0 msdasql same problem.



here tie settings i use:



set cn = new adodb.connection
with cn
.provider = "microsoft.jet.oledb.4.0"
.connectionstring = "data source=" & filepath & ";extended properties=excel 8.0;"
- - - - - - - -
.provider = "msdasql"
.connectionstring = "driver={microsoft comparison engineer (*.xls)};" & _
"dbq=" & filepath & ";maxscanrows=0;"
.cursorlocation = aduseclient
.open
end
set rsselects = new adodb.recordset
set rsselects = cn.execute("select [option#5] " & "[" & strtbl & "]")


this problem wholly occurs there some-more 8 rows (excluding buttress names), i have set maxscanrow=0 msdasql connection, nonetheless assembled same results.



notable digest references i have enclosed are:




  • ms activex information objects 2.8 library

  • ms activex information objects recordset 2.8 library

  • ms comparison 11.0 vigilant library

  • ms information contracting collection vb 6.0 (sp4)



any assistance matter unequivocally appreciated!



(1) reason, including decimal indicate buttress name, interpreted #.






thanks everyone! median by perplexing set adult schema.ini "programmatically" 's glorious separate me towards solution:



.provider = "microsoft.jet.oledb.4.0"
.connectionstring = "data source=" & filepath & ";extended properties=""excel 8.0;hdr=yes;imex=1"";"


i inspire anyone identical problems review post comments, given there slight variations fortitude chairman another.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?