Results 1 to 3 of 3

Thread: Import data of sheet in current workbook into Power Query WITHOUT named range

  1. #1
    Neophyte Galven's Avatar
    Join Date
    Feb 2020
    Posts
    2
    Articles
    0
    Excel Version
    2016

    Import data of sheet in current workbook into Power Query WITHOUT named range



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,
    How to import the data of the sheet called "Input" into Power Query without using a named range ?
    That sheet is located in the workbook containing the query.
    Thanks

  2. #2
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Location
    Ipswich, Suffolk, England
    Posts
    1,366
    Articles
    0
    Excel Version
    Office 365 Subscription
    Just select the worksheet tab when you import the data from the workbook into PQ.
    Ali
    Enthusiastic self-taught user of MS Excel!

  3. #3
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,355
    Articles
    56
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Hi Galven,

    If the sheet is within the same workbook, the only safe way to pull it in to Power Query is by using a Table or a Named Range.

    There are two workarounds to this issue:

    1) Set a print area
    You could then create a blank query and use the following formula to access the Print Area:
    [formula]= Excel.CurrentWorkbook()[/formula]

    The trick here is just to make a print area that is bigger than the maximum size your data will ever be.

    2) Use "From Excel" and target the file you're in.
    DO NOT DO THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING

    The challenge with this approach is that the data you pull is the most recent saved version of the file. So if you update something in the worksheet, then refresh, the data will not refresh unless you've saved the workbook first. In addition, if you are trying to connect to all tables in the workbook, it is very easy to create a circular reference that only shows up after you save. It's a nightmare to debug unless you realize what is happening.

    Hope that helps,
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

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