DevilAkuma
Active member
- Joined
- Oct 24, 2005
- Messages
- 37
- Programming Experience
- Beginner
Hello!
I've a little problem when I try to read an excel file. The problem is that the system eats one file of data from the excel! I think that it's waiting to read and excel with headers, but my file doesn't have headers... All is valid dates!
I read the file with this:
The first string readed in a is the A2 cell in my Excel...l Why!?!?
Thanks in advance
I've a little problem when I try to read an excel file. The problem is that the system eats one file of data from the excel! I think that it's waiting to read and excel with headers, but my file doesn't have headers... All is valid dates!
I read the file with this:
VB.NET:
objOleConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; " &
"data source=" & path & "; Extended Properties=Excel 8.0;")
objDataAdapter = New System.Data.OleDb.OleDbDataAdapter("select * from [" & Sheet1 & "$] ", objOleConnection)
objDataSet = New System.Data.DataSet
objDataAdapter.Fill(objDataSet)
For Each objRow As DataRow In objDataSet.Tables(0).Rows
Dim a As String = objRow.Item(0)
Next
objOleConnection.Close()
The first string readed in a is the A2 cell in my Excel...l Why!?!?
Thanks in advance