Results 1 to 3 of 3

Thread: [RESOLVED] How To Use Excel File/Range as Recordset and Run SQL on it

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    93

    Resolved [RESOLVED] How To Use Excel File/Range as Recordset and Run SQL on it

    I need to know how to set an excel range as a recordset so I can write some sql queries, then transfer my query results to another excel file for reporting. I know how to do step 2, just need to know how to setup the excel file/range as an ODBC source I guess.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How To Use Excel File/Range as Recordset and Run SQL on it

    http://support.microsoft.com/kb/257819
    check out this info from m'soft
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    93

    Re: How To Use Excel File/Range as Recordset and Run SQL on it

    Awesome, thanks for the quick reply, exactly what I need to make my life easier!! I knew it could be done. Now I won't need to import the worksheet into Access anymore.

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