Hi All, thanx for your supports and contributions, i was able to use the
GetOleDbSchemaTable
concept to solve the problem. Found below is the solution:
Dim f As New OpenFileDialog()
f.Filter = "Excel files | *.xls"
f.InitialDirectory = My.Application.Info.DirectoryPath
If f.ShowDialog() = DialogResult.OK Then
If f.FileName IsNot Nothing AndAlso f.CheckFileExists = True Then
Me.SVTest = f.FileName
Me.XlsPath.Text = f.FileName
Label6.Text = ("Driver: ") & f.FileName
Open()
dt = ODBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)
For Each row As DataRow In dt.Rows
Dim sq As New OleDbDataAdapter("select * from [" & row.Item("TABLE_NAME") & "]", ODBConn)
Dim XlsDT As New DataTable
sq.Fill(XlsDT)
XlsDT.TableName = row.Item("TABLE_NAME")
ComboBox1.Items.Add(XlsDT.TableName)
Next
Close()
End If
End If