Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text columns truncated/mangled

Status
Not open for further replies.

rmusgrove

Programmer
Mar 12, 2003
43
US
I don't know if this is the best forum for this question, so please bear with me...

I have an Excel sheet, and a VB 6 program that reads it using the ODBC driver for Excel. This program has always worked well, until it had to read a text cell with more than 255 characters in it. It just doesn't work. It actually reads in the correct number of characters, as len(coldata) returns the right number, but all data after character position 255 is mangled. I've even tried importing the Excel into an Access DB, and instead of being mangled, the data gets truncated. Now, I've found a kind of hacky way around the problem: If I insert a row at the TOP of the sheet with more than 255 chars in the problematic cell, the driver seems to get initialized correctly, and will subsequently read the data in the rest of the rows/cells correctly. This is really hack, though. Is there some ... setting ... something I can set that will force the Excel ODBC driver to allocate more space for this text cell, other than to insert this initial row? Thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top