Hola estoy usando el siguiente codigo para poder leer un
excel con visual
openFileExcel.ShowDialog()
txtfile.Text = openFileExcel.FileName
Dim MyCommand As
System.Data.OleDb.OleDbDataAdapter
Dim MyConnection As
System.Data.OleDb.OleDbConnection
MyConnection = New
System.Data.OleDb.OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=" & txtfile.Text & "; " & _
"Extended Properties=Excel 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter
( _
"select * from [Base$]", MyConnection)
DS = New System.Data.DataSet
MyCommand.Fill(DS)
MyConnection.Close()
datosExcel.DataSource = DS.Tables(0)
Mi pregunta es, si hay alguna manera de abrir la hoja de
excel sin tener el input del nombre de dicha hoja, o sea
sin saber como se llama poder abrirla
saludos,
Walter
Leer las respuestas