Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ONG ONG is offline
external usenet poster
 
Posts: 7
Default Use ADO in VB to read excel file problem

Hi all,

I have written a VB program to read the excel file via ADO.
ie :
rs.Open "SELECT * FROM [sheet1$]"

However, I find that if the excel cell contains more that 255 characters,
the recordset cannot retrieve it correctly, it will store the first 255
character and discard the rest.

Is it a ADO Excel provider limitation ?
anyone idea to solve this problem ?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Use ADO in VB to read excel file problem

Hi
A cell can contain up to 256 chrs. If you are reading 255 the VB control you
are using is probally set to o index. Most VB controls can be set to either 0
or 1 as the starting index number.

Goog Luck
TK



"ong" wrote:

Hi all,

I have written a VB program to read the excel file via ADO.
ie :
rs.Open "SELECT * FROM [sheet1$]"

However, I find that if the excel cell contains more that 255 characters,
the recordset cannot retrieve it correctly, it will store the first 255
character and discard the rest.

Is it a ADO Excel provider limitation ?
anyone idea to solve this problem ?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Use ADO in VB to read excel file problem

A cell can contain approximately 32K characters in xl97 and later.

--
Regards,
Tom Ogilvy


"TK" wrote in message
...
Hi
A cell can contain up to 256 chrs. If you are reading 255 the VB control

you
are using is probally set to o index. Most VB controls can be set to

either 0
or 1 as the starting index number.

Goog Luck
TK



"ong" wrote:

Hi all,

I have written a VB program to read the excel file via ADO.
ie :
rs.Open "SELECT * FROM [sheet1$]"

However, I find that if the excel cell contains more that 255

characters,
the recordset cannot retrieve it correctly, it will store the first 255
character and discard the rest.

Is it a ADO Excel provider limitation ?
anyone idea to solve this problem ?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Use ADO in VB to read excel file problem

I assumed "ong" was using an older version and was having trouble returning
the last character. I stand corrected or amended.

Good Luck
TK


"Tom Ogilvy" wrote:

A cell can contain approximately 32K characters in xl97 and later.

--
Regards,
Tom Ogilvy


"TK" wrote in message
...
Hi
A cell can contain up to 256 chrs. If you are reading 255 the VB control

you
are using is probally set to o index. Most VB controls can be set to

either 0
or 1 as the starting index number.

Goog Luck
TK



"ong" wrote:

Hi all,

I have written a VB program to read the excel file via ADO.
ie :
rs.Open "SELECT * FROM [sheet1$]"

However, I find that if the excel cell contains more that 255

characters,
the recordset cannot retrieve it correctly, it will store the first 255
character and discard the rest.

Is it a ADO Excel provider limitation ?
anyone idea to solve this problem ?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Use ADO in VB to read excel file problem

"TK" wrote ...

I have written a VB program to read the excel file via ADO.
ie :
rs.Open "SELECT * FROM [sheet1$]"

However, I find that if the excel cell contains more that 255
characters,
the recordset cannot retrieve it correctly, it will store the first 255
character and discard the rest.

Is it a ADO Excel provider limitation ?
anyone idea to solve this problem ?


Sounds like Jet is determining the column's data type as 'text' rather
than 'memo'. For details see:

http://www.dicks-blog.com/excel/2004...al_data_m.html

Jamie.

--


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Use ADO in VB to read excel file problem

While the 255 limit is up for discussion, why is there still a limt of 255
characters when copying a sheet?

I found this today in XP and just tried it in 2003 and am somewhat surprised
given that the character limit has gone up over the years to find that I
can't copy a sheet without losing data. I've got an easy workaround, but
surely this is a legacy they should have been fixed?

Robin Hammond
www.enhanceddatasystems.com


"Jamie Collins" wrote in message
om...
"TK" wrote ...

I have written a VB program to read the excel file via ADO.
ie :
rs.Open "SELECT * FROM [sheet1$]"

However, I find that if the excel cell contains more that 255
characters,
the recordset cannot retrieve it correctly, it will store the first 255
character and discard the rest.

Is it a ADO Excel provider limitation ?
anyone idea to solve this problem ?


Sounds like Jet is determining the column's data type as 'text' rather
than 'memo'. For details see:

http://www.dicks-blog.com/excel/2004...al_data_m.html

Jamie.

--



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
How do you save an excel file to be read as IBM-type text file ? Dee Franklin Excel Worksheet Functions 2 October 10th 06 02:46 AM
excel 2002 -how can you convert a file to a pdf read only file? spunkyf15 Excel Discussion (Misc queries) 4 September 29th 06 09:36 PM
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM
Urgent problem saving a file read only DoctorV[_3_] Excel Programming 4 July 16th 04 04:34 PM


All times are GMT +1. The time now is 05:43 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"