+ Reply to Thread
Results 1 to 4 of 4

Connect Listobject to QueryTable and To Power Query

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Connect Listobject to QueryTable and To Power Query

    Hi Guys,

    I have about 250 tables in Power Query and Excel started to have delay when inputting data. Which i have to somehow workaround.

    Model is working like:
    1. Downloading all tables from my organization internal sever.
    2. When table is already in worbook - just refresh data.
    3. If not, add new worksheet and new table and create new workbook connection to power query.

    So i was thinking to delete not necessarry queries.
    So it could work like :
    1. If query not necessarry in workbook -> delete just power query.
    2. While importing data check if listobject created previously exists, if yes add query table and connect to power query.

    In attachement i added example query.
    Now delete power query. How to recreate connection between listobject created by power query and power query?

    It is possible via VBA?
    Best,
    Jacek
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Connect Listobject to QueryTable and To Power Query

    I am wondering if i will not use:

    ADODB.connection and
    ADODB.recordset as a replacement for Power Query.

    Best,
    Jacek

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Connect Listobject to QueryTable and To Power Query

    Hi Guys,

    so it is not possible? I have to create once again listobject and query table with connection ?

    Best,
    Jacek

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Connect Listobject to QueryTable and To Power Query

    Ok Guys,

    it is not possible, but there is workorund.

    Let me know if this works for you:

    Change CommandText for Workbook.OldeDBConnection to for example "Select * From 1" and disable query refresh with Code,
    now you can delete power query.
    When you will recreate power query you can change CommandText to "Select * From" & [QueryName] and enable query refreshing. And it is working!

    So you do not have to keep all 250 power queries in your workbook - it will be terrible slow! You can just save Power M language code for each your query and recreate them when needed...

    Hope i help.

    Best,
    Jacek

+ 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. [SOLVED] Power Query connect to source only once
    By jaryszek in forum Excel General
    Replies: 4
    Last Post: 11-03-2020, 12:39 PM
  2. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  3. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  4. [SOLVED] Create Listobject.queryTable name from Access table
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2019, 02:26 AM
  5. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  6. ListObject QueryTable Refresh
    By Lsxtrkiller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2016, 09:54 AM
  7. How to test successful connection to ODBC source using ListObject/QueryTable?
    By beacon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2013, 10:03 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