+ Reply to Thread
Results 1 to 2 of 2

Using Microsoft Query

  1. #1
    Paul Johnson
    Guest

    Using Microsoft Query

    I'm am using Microsoft query to return data from a combination of 2 sheets
    within the workbook and into a new sheet.
    How can I control the sql to always find the spreadsheets in the workbook in
    the current directory? So that if I save the workbook to different location
    the queries work for the workbook in the new location. At present if I save
    it back it looks to the old location for the tables.

    Thanks

    Paul



  2. #2
    Jamie Collins
    Guest

    Re: Using Microsoft Query

    Paul Johnson wrote:
    > How can I control the sql to always find the spreadsheets in the

    workbook in
    > the current directory? So that if I save the workbook to different

    location
    > the queries work for the workbook in the new location. At present if

    I save
    > it back it looks to the old location for the tables.


    Simply omit the path in the connection string e.g.

    instead of

    SELECT * FROM [Excel 8.0;Database=C:\Tempo\Book1.xls;].[A:A];

    use

    SELECT * FROM [Excel 8.0;Database=Book1.xls;].[A:A];

    Jamie.

    --


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1