easily done my friend.
the Statement would be:
"SELECT * FROM [SheetName$A3:A25]"
overall....
Dim theDataSet as new DataSet()
Dim theOleDbCommand as new OleDbCommand("SELECT * FROM [SheetName$A3:A25]", new OleDbConnection(ConnectionStringHere))
Dim theOleDbDataAdapter as new OleDbDataAdapter(theOleDbCommand)
theOleDbCommand.Connection.Open()
theOleDbDataAdapter.Fill(theDataSet)
theOleDbCommand.Connection.Close()
Me.theDataGridView.DataSource = theDataSet.Tables(0).DefaultView
www.connectionstrings.com -> for your connection strings
be sure to import the System.Data.OleDb namespace in your import declarations
|