+ Reply to Thread
Results 1 to 8 of 8

MS Query - can't get "linked" correctly - tying to "import external data"

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Appleton, WI
    MS-Off Ver
    Excel 2003
    Posts
    43

    MS Query - can't get "linked" correctly - tying to "import external data"

    Been working on this all day (Excel 2002). I want to create the proper "links" to have a MS Query read an EXISTING .xls (by going to Import External Data as a START), then return the selected rows via the MS Query Criteria to a 2nd .xls. I actually had a similar MS Query like this working (I got LUCKY), but I cannot remember how/what I need to create the "links" - that is very confusing regarding WHAT I need to choose as a "data source", AND then where to go next from THERE, IF I need .odc and/or .dsn, etc. - Just DAMN confusing, for sure. Can't find any answers on the web.
    Last edited by dcavaiani; 11-06-2015 at 07:08 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    I don't still have 2002 installed anywhere but isn't there an option in the import dialog to use Excel files as a source? That should then allow you to browse to the file you want.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    Here is a step by step tutorial that should help

    http://exceluser.com/formulas/msquer...ional-data.htm
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    10-18-2012
    Location
    Appleton, WI
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    OK, that helps, but here is what happens:

    I go to:

    Import External Data
    New Database Query
    Choose Data source -> Excel Files* OK
    Then "select Workbook" appears.

    The problem is NOT that I CAN select CERTAIN Workbooks and they DO appear in the next pop-up window "Add Files" and I can go on from there just fine. BUT THAT THERE ARE OTHER ACTUAL/GOOD WORKBOOKS, WHICH WHEN I SELECT, they come up empty, I.E., DO NOT SHOW UP IN THE ADD TABLE POP-UP ??

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    I have seen this happen. I cannot replicate the issue now, but if I recall correctly, click on through to the Query Form/Grid and manually make the selection there.

  6. #6
    Registered User
    Join Date
    10-18-2012
    Location
    Appleton, WI
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    Quote Originally Posted by alansidman View Post
    Here is a step by step tutorial that should help

    http://exceluser.com/formulas/msquer...ional-data.htm
    This is by far the best article I have seen on this topic! Still having issues though. I actually had a MS Query working before (somehow) and I did NOT use any named ranges. I have 3 separate workbooks. I need to create 2 queries, one with wbk1 linked to wbk3, and the other wbk2 linked to wbk3. Each of these queries must return data to the same 4th wbk. I am seeing some $_ at the end of some of the tables and I don't know where that comes from either? Is there a way to clear out all previous 'saved' attempts and start over "clean".

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    Not sure where the saved queies are located on your system. Do a search on *.qry and see if you can find them and then delete them.

  8. #8
    Registered User
    Join Date
    10-18-2012
    Location
    Appleton, WI
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: MS Query - can't get "linked" correctly - tying to "import external data"

    ANYONE at all have an Example of an INSERT MS Query statement which actually works within Excel MS Query ? I am trying to select fields from an Excel Wbk and Insert same fields into a Second Wbk (with selection criteria as well).

    This is my code:

    <pre>
    insert into 'C:\rick excel only\invoicing.xls'.invoicing invoicing (Materials.Friday, Materials.InvCust, Materials.InvoicedDate, Materials.InvMatl)
    SELECT Materials.Friday, Materials.InvCust, Materials.InvoicedDate, Materials.InvMatl
    FROM `C:\Rick Excel Only\Materials.xls`.Materials Materials;
    </pre>

    Won't run!
    Last edited by dcavaiani; 11-08-2015 at 08:55 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. Replies: 1
    Last Post: 06-06-2013, 06:28 PM
  4. Replies: 2
    Last Post: 06-06-2013, 12:45 PM
  5. Replies: 1
    Last Post: 09-08-2010, 12:20 AM
  6. Remove "TRUE" "FALSE" words from a linked checkbox
    By MDCK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2008, 03:26 AM
  7. email on condition from "import external data"
    By CAP in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-03-2005, 01:05 PM
  8. [SOLVED] Import external data &amp;quot;PROBLEM&amp;quot;
    By Roger MacInnis in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-13-2005, 01:05 AM

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