Author: kldeutsch | Posted on: 7/30/2009 1:16:21 PM | Views : 476

 What I have is a excel import to a datagrid, but there are 3 problems.  The first is it has to be 2003 excel, the second is users get frustrated because they cannot pick from a drive location, mine is static and then the file name has to be static along with the sheet name.  So what I would like is the ability to import 2007 excel doc and be able to pick form any drive location, any file and sheet name.
Private Sub ExcelImport()
        Dim connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\MobTracker\MobTracker3.xls;Extended Properties='Excel 8.0;'"
        Dim connection As New OleDb.OleDbConnection(connectString)
        Dim command As New OleDb.OleDbCommand
        Dim myDataAdapter As New OleDb.OleDbDataAdapter
        Dim ...

Go to the complete details ...