I am trying to import some data to work from an Excel file, but I am having problems with the numerical values ββof the cells. I have several columns that will have values, where some of them are numeric, while other values ββcan be a combination of numeric and non-numeric values ββ(without special characters, only the letters AZ). To output data to a recordset, I do the following
Set oconn = New ADODB.connection oconn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & excelFile & ";" & "Extended Properties=""Excel 8.0;HDR=YES;""" sTableName = "[sheet1$]" sTableName = "select * from " & sTableName Set oRs = New ADODB.Recordset oRs.Open sTableName, oconn, adOpenStatic, adLockOptimistic
When I read the values ββof the recordset, the numerical values ββare displayed as empty in the columns where the data is in a mixed format. Is there a way to make a recordset just read all values ββas text or an alternative way to read an Excel file to avoid this problem?
source share