excel - could not find installable isam [vb.net] -


i have following problem, using connection string:

"provider=microsoft.ace.oledb.12.0;data source=" + filename + ";extended properties=excel 12.0 xml;"

then, can execute open-task. nevertheless, if want use following connection string:

"provider=microsoft.ace.oledb.12.0;data source=" + filename + ";extended properties=excel 12.0 xml;hdr=no"

i mistake, saying me installable isam not found.

what wrong second connection string, need 1 because in worksheet no headers used.

thanks in advance

if want query excel you must have '$' sign after sheet name in order define sheet table. anyway code wrote purpose:

 try         dim myconnetion new oledbconnection         dim dataset system.data.dataset         dim mycommand system.data.oledb.oledbdataadapter         dim path string = fullpath          myconnetion = new system.data.oledb.oledbconnection("provider=microsoft.ace.oledb.12.0;data source=" + path + ";extended properties=excel 12.0;")         mycommand = new system.data.oledb.oledbdataadapter("select * " & "[" & sheetname & "$]")          dataset = new system.data.dataset         mycommand.fill(dataset)         dgv.datasource = dataset.tables(0)         myconnetion.close()       catch ex exception         msgbox(ex.message.tostring)     end try 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -