problem with fetching data from excel

B

bob

Hi,

I defined a table in excel with only on row containing the headertext of the
datafields of a detailsview.
My problem is that when i get the data from excel, the content of cells
containing a long string (e.g. 80 characters or more) is cut to 64.

Why, and is there a way to get the whole content of the cell?

My code:
sql = "select * from mytable;"
'(get all the headertext values from excel)
comd = New OleDbCommand(sql, oConnection)
Dim nfield As Integer
dtreader = comd.ExecuteReader
nfield = dtreader.FieldCount
'(number of cells in the row in excel = number of fields in detailsview)
For i = 1 To nfield
DetailsView1.Fields(i - 1).HeaderText = dtreader.GetName(i - 1)
'(put the value coming from excel into the headertext of the detailsview)
Next


Thanks for helping
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top