Dim dbcon As OleDbConnection = New OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\(ur xcel sheet name).XLS;Extended Properties=Excel 8.0;") Dim cmd As oledbCommand = New oledbCommand("select * from [sheet1$]", dbcon) Dim ds AsNew DataSet() Dim da As oledbDataAdapter = New oledbDataAdapter()
da.SelectCommand = cmd
da.fill(ds)
datagrid1.datasource=ds
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.