+ Reply to Thread
Results 1 to 1 of 1

When are External Connections not QueryTables?

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    20

    When are External Connections not QueryTables?

    Hello All,
    Some background:
    I've been using a perl script(not that it matters much since it's just calling the same DLLs ) for a number of years to auto-magically refresh QueryTables in Excel workbooks via Task Scheduler.
    Moving to Office 2013 this stopped working. (the script FYI: link )
    It not being my code and interested in a solution that wasn't a blackbox I started digging into it and thought I'd recreate it in C#.

    Most of the "how do you refresh connections in excel" questions talk about QueryTable.Refresh...
    But after that not working I wrote the below debug code and the output tells me that there aren't actually any QueryTables in the Excel file.

    Then I stumbled onto this: Microsoft.Office.Interop.Excel.WorkbookConnection ( link ) link2

    So I guess my question is, what did I do that the connections aren't seen as QueryTables anymore and how to do I fix them? (They do look like QueryTables...ie, It's an external connection that feeds to a Table)

    Also, more generally , is there something fundamental that I'm missing?

    Many Thanks and sorry for the overly long background/question.
    Regards,
    Alex


    Please Login or Register  to view this content.
    This works though
    Please Login or Register  to view this content.
    Last edited by apolloni; 08-07-2013 at 09:25 AM. Reason: added solution. I still don't understand why the QueryTables aren't there though.

+ 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. Workbook Connections and Querytables
    By springboardjg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2013, 01:12 PM
  2. external data - cleanup existing connections
    By edstevens in forum Excel General
    Replies: 1
    Last Post: 04-26-2013, 12:03 PM
  3. QueryTables don't work for external data using MSDN code
    By Telperion in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 10:51 AM
  4. Replies: 2
    Last Post: 05-24-2012, 08:43 AM
  5. Pulling Data from unopened Excel Spreadsheets with external connections
    By nschneemann in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2010, 11:26 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