Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: How to select using where in Excel NO headers

    I am trying to reference a column in a Excel sheet but there are no headers I need to State a WHERE cluse from the "B" column of the sheet.
    Example: SELECT * FROM [UPSCN$] WHERE this is where I need help I need to qry the b column in excel. USIng ADO
    Thank you

  2. #2
    Join Date
    Jun 2004
    Arizona, USA

    Since there is no server, the entire sheet is copied from the file to the ado client anyway, so I would recommend

    a) load the entire sheet into the recordset, and
    b) apply a filter to the resultant recordset. after loading the data, rs.Field(1).Name holds the name of the "field" which you could then use in the filter.

    rs.filter = rs.field(1).Name & " = 'ABC'
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

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