Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.dotnet.framework.aspnet.webcontrols,microsoft.public.dotnet.languages.vb.data,microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 1
Default problem with fetching data from excel

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Incremental number for a fetching data The Ron Excel Worksheet Functions 1 November 9th 07 07:21 PM
Fetching data from another worksheet c2k2 New Users to Excel 4 February 17th 06 04:57 PM
Fetching data from other sheets Palendromedary Excel Discussion (Misc queries) 3 December 21st 05 02:22 PM
Fetching External Data from Excel Sri Excel Discussion (Misc queries) 2 January 3rd 05 11:46 AM
Problem while fetching Excel records? Biju Excel Programming 3 November 6th 03 02:34 PM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"