I have a problem to return the excel data to a DataGridView ... I am using the commands below
Dim connectionStringExcel As String = "Driver={0};DriverId=790;
Dbq={1};DefaultDir={2};Extended Properties=""HDR=yes"";"
Dim driverExcel As String = "{Microsoft Excel Driver (*.xls)}"
conn = New OdbcConnection(String.Format(connectionStringExcel, driverExcel, odb.FileName, Path.GetDirectoryName(odb.FileName)))
cmd = New OdbcCommand("select * from [Plan1$]", conn)
da = New OdbcDataAdapter(cmd)
dt = New DataTable
da.Fill(dt)
The problem is that when a column has many numeric values it considers as a numeric column and does not return alphanumeric data, I would like to know how to set the query data type.