Populating cell from database (1031 characters)

T

Tim

Hi Folks, I am trying to populate a worksheet from an access front end (SQL
server backend) with the following code. Some data is long text (1031 chars
and more) and it throws an error:

Has anyone succeeded with this sort of thing?

Thanks

Tim

"Application defined or Object defined error"

Do Until rs.EOF
For lCol = 0 To rs.Fields.Count - 1
oXL.Cells(lRow + 1, lCol + 1) = rs(lCol)
Next
lRow = lRow + 1
rs.MoveNext
Loop
 
G

Gary Keramidas

excel 2003
Length of cell contents (text) 32,767 characters. Only 1,024 display in a
cell; all 32,767 display in the formula bar


excel 2007
Total number of characters that a cell can contain 32,767 characters


which version are you using?
 
T

Tim

Thanks Gary, Excel 2003 is the version.

The catch is that it actually throws an error when there is a large text
field (eg memo).

"Application defined or Object defined error"
 

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

Top