Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ADODB is unable to copy more than 255 chars in excel cell

Hi,

Can anybody help me to overcome this problem?

ADODB is not allowing me to copy more than 255 characters into an excel
cell. I must truncate the string to 255 characters before updating.
otherwise it is throwing exception and fails. Please check the code
below. Some times the string length is more than 255 characters.

Thannks.



XLSConn = New ADODB.Connection
XLSConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strDestination & _
";Extended Properties=""Excel 8.0;HDR=NO;""")


Dim source As String
Dim arrData
Dim Counter As Integer
source = "Select * from [" & sheetName & "$" & strRecRange &
"]"
XLSrs.Open(source, XLSConn, 1, 3)
arrData = Split(strRec, Chr(9))

For Counter = LBound(arrData) To UBound(arrData) - 1
XLSrs.Fields(Counter).Value = Left(arrData(Counter),
255)
Next

XLSrs.Update()
XLSrs.Close()

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
unable to copy cell reference steven Excel Discussion (Misc queries) 6 October 1st 09 03:14 AM
Anyone notice excel search within cell limited to first 1024 chars frank479 Excel Discussion (Misc queries) 1 May 14th 06 04:55 AM
Copy sheets with more than 255 chars in a cell? Chem Mitch Excel Worksheet Functions 1 April 16th 05 01:17 AM
Unable to Copy COUNTA() with cell references EugenioB Excel Worksheet Functions 1 February 16th 05 01:07 PM
copy cells with more then 255 chars... Xavalon Excel Programming 7 June 28th 04 12:50 PM


All times are GMT +1. The time now is 06:07 AM.

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"