Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Sep 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MS Query of Excel Datalist --DataType Mismatch

    I am using MS Query in Excel to do a database query of a named range on another Excel file. The challenge I am having is that the query treats columns/fields that have a lot of numeric values as number data type fields and ignores (leaves as blank) any text or alphanumeric entries in the field. Is there a way to change the query or criteria so that it treats certain fields as text even if they have a lot of numbers or all numbers in them? I have formatted the original Excel fields with text cell formatting, but this does not help.

    Thanks.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: MS Query of Excel Datalist --DataType Mismatch

    Could you change the source data to be text thru the additon of a "sticky-space" (concatenate a char(160) to it, for example) to ensure they are read as text?

    Steve

  3. #3
    New Lounger
    Join Date
    Sep 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MS Query of Excel Datalist --DataType Mismatch

    Thanks for replying. I did think of adding a letter to the Excel numbers, but I'm curious if MS Query has any way to change the table definitions without changing the Excel data. (Even adding a few text entries at the top doesn't solve the problem.)

    Thanks!

Posting Permissions

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