Results 1 to 3 of 3

Thread: [RESOLVED] The ADO, Excel and numbers mystery

  1. #1

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Resolved [RESOLVED] The ADO, Excel and numbers mystery

    I'm accessing an Excel spreadsheet using an ADO connection in VB6.

    If the spreadsheet field contains just numbers the recordset returns a null.

    Why?

    The column is formatted to 'text'
    If the cell is alphanumeric it's fine
    if the number in the cell has an apostophe in front of it it's fine...


    Thanks
    Another light-hearted post from Guru

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: The ADO, Excel and numbers mystery

    I remember someone else had the same problem but sorry I can't remember the exact cause. I think it had something to do with inconsistent data in the column, eg 1 cell has numeric data another cell has string data.

  3. #3

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Re: The ADO, Excel and numbers mystery

    YES! YES! YES!

    Thanks

    I added 'inconsistent data' in my google search and found the solution!


    Extended Properties="Excel=8.0;HDR=3DYes;IMEX=1;"
    Another light-hearted post from Guru

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width