I have a problem: On my excel I have a column with integer and string. I need to read the column and fill a datatable with whatever I has.
the excel looks like this:
Ndedocumento
2.147.483.647,
959.224,
949.143,
530.949,
the first as a string, the next as integer.
My applicattion retturns:
Ndedocumento
null,
959.224,
949.143,
530.949,
I tried to post images so you can see it clearly but im not allowed. And it takes me off the enter between the numbers :(
Do you know any way to read all the values? Because on this way I get the value on nothing so I can't format it or anything that makes me catch the value.
here is my code to read the excel:
conexion_te.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ruta_archivo + "; Extended Properties=Excel 12.0 Xml;HDR=YES;"
Dim cmd As New OleDb.OleDbCommand
Dim da As New OleDb.OleDbDataAdapter
Dim dtExt As New DataTable
cmd.CommandText = "Select * FROM [" + Me.Combo_Tabla_Hoja.SelectedItem + "]"
cmd.Connection = conexion_te
da.SelectCommand = cmd
da.Fill(dtExt)