I have a web app that allows a user to upload an excel spread sheet and then
view it on the web (okay it does more than that but this is the part with a
problem).
The spread sheet uploads correctly, it even displays well in the data grid.
There is one problem however.
The first record always seems to be corrupt.
In my spreadsheet I have the following records:
456456456 456456456 John Doe 7057431006 fr**@abc.com
789789789 789789789 Frank Doe 7057431006 fr**@abc.com
123123123 123123123 Albert Doe 7057431006 fr**@abc.com
963963963 963963963 Johannus Doe 7057431006 fr**@abc.com
852852852 852852852 Jack Doe 7057431006 fr**@abc.com
741741741 741741741 Andrew Doe 7057431006 fr**@abc.com
Output from the data grid shows the exact same data EXCEPT the first row
is:'
F1 F2 John Doe F5 fred@abc#com
Does anyone have any idea what might be happening here?
here is the code:
<code>
Dim myds As New DataSet
Dim MyExcelConnectStr As String = "Provider=Microsoft.Jet.OLEDb.4.0;data
source=" & strFileName & ";Extended Properties=""Excel 8.0;"""
Dim MyOleADapter As New OleDb.OleDbDataAdapter("SELECT * FROM
[Sheet1$]", MyExcelConnectStr)
MyOleADapter.Fill(myds, "xlsdata")
DataGrid1.DataSource = myds.Tables(0)
DataGrid1.DataBind()
</code>