problem with fetching data from excel

Discussion in 'ASP .Net Web Controls' started by bob, Oct 14, 2006.

  1. bob

    bob Guest

    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
     
    bob, Oct 14, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bhavesh
    Replies:
    0
    Views:
    444
    Bhavesh
    Jul 16, 2007
  2. Bhavesh
    Replies:
    5
    Views:
    674
    Bhavesh
    Jul 18, 2007
  3. Bhavesh
    Replies:
    1
    Views:
    468
    Bhavesh
    Jul 17, 2007
  4. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,594
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Replies:
    2
    Views:
    147
    Joel Goldstick
    Mar 16, 2013
Loading...

Share This Page