+ Reply to Thread
Results 1 to 3 of 3

Power Query can you get around the hardcoded file location for sample file?

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    78

    Power Query can you get around the hardcoded file location for sample file?

    My documents are used by multiple team members and they are saved down in different folders by account managed, due to this I use a named range in excel where they put the folder location in to load the raw data. Rather than going into power query and changing the location.

    However we have recently changed drives and the sample file location is hardcoded into PQ. The old drive is no longer available so it errors.
    I can explain how to fix this but they won’t remember if it happens again and if I wasn’t there they wouldn’t know how to fix it.

    I have a FAQs for PQ errors but thinking long term and aiming to keep the document user friendly so they do not need to go into the code to edit, as it just ‘scares’ some people. Is there an alternative way to set up the sample file?

    My documents are used by multiple team members and they are saved down in different folders by account managed, due to this I use a named range in excel where they put the folder location in to load the raw data. Rather than going into power query and changing the location.

    However we have recently changed drives and the sample file location is hardcoded into PQ. The old drive is no longer available so it errors.
    I can explain how to fix this but they won’t remember if it happens again and if I wasn’t there they wouldn’t know how to fix it.

    I have a FAQs for PQ errors but thinking long term and aiming to keep the document user friendly so they do not need to go into the code to edit, as it just ‘scares’ some people. Is there an alternative way to set up the sample file?

    I’ve been thinking, sample file looking at the named range also - I can’t seem to apply this to the sample file. However I guess the safety feature is if someone links to an incorrect folder with different data it wouldn’t match the sample file so it would error to remind you to check the location given, which is why the sample file is hard coded?


    Just thinking out loud and rambling but any advice on the above or alternative options are welcome. Thanks!
    Last edited by MushroomFace; 07-22-2020 at 04:38 AM.

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

    Re: Power Query can you get around the hardcoded file location for sample file?

    If I understand correctly your issue, then this link may solve your problem.

    https://medium.com/@wkrzywiec/passin...y-19ec60797d94
    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

  3. #3
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    78

    Re: Power Query can you get around the hardcoded file location for sample file?

    I do use a named range to pull through the file location.

    I shouldn't write posts late a night, i was rambling. My issue was with the Sample File, i have figured instead of using the edit and combine to just add a custom column with =Excel.Workbook([Content]), then expand from there and it does not generate a sample file.

    Thank you for your input, much appreciated!
    If you like my answer please *Add Reputation

+ 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. Import txt file using power query
    By kv.singh in forum Excel General
    Replies: 6
    Last Post: 04-27-2020, 05:05 AM
  2. Scheduling Power Query to Update File
    By wherdzik in forum Excel General
    Replies: 1
    Last Post: 03-28-2020, 09:02 PM
  3. [SOLVED] Power Query Text File
    By lyla22 in forum Excel General
    Replies: 6
    Last Post: 09-26-2019, 03:32 PM
  4. [SOLVED] Power Query results to a .csv file
    By JohnnyBoyxxx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2019, 02:39 AM
  5. [SOLVED] Excel Power Query with file being used
    By taylorsm in forum Excel General
    Replies: 34
    Last Post: 11-02-2017, 05:57 PM
  6. Replies: 11
    Last Post: 08-01-2017, 06:08 AM
  7. Power Query how do i reuse on a new file
    By thorrrr in forum Excel General
    Replies: 3
    Last Post: 05-03-2014, 02:07 PM

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