Power Query Refresh Prompt To Select File

wsnyder

Board Regular
Joined
Sep 23, 2018
Messages
224
Office Version
  1. 365
Platform
  1. Windows
Hi,

Using M365.

A new data file is created daily. in .xlsx format.
How can I setup power query to always prompt user to select a file?

I was able to create the connection to a csv file using Legacy Wizard from Text and this is always prompting me to chooses a csv file
But I cannot seem to repeat when using xlsx file as my data source.

Thanks
-w
 

Attachments

  • pq_prompt.png
    pq_prompt.png
    35.8 KB · Views: 85

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You can't. At least: I would not know how using any of the available Power Query features. Maybe with some VBA magic there is a way.

However you can inside Power Query read data from folder and retrieve file names. Then create a list from this result.
Use a parameter that can hold any of these values (being file names).
The end users clicks on the parameter query and is prompted to select a file from the given list.
Then end user needs to close the Power Query window.
Finally refresh the result query.

It's almost the same thing, but it does not offer the same user experience as with the legacy import.
 
Upvote 0
Thanks GraH,

I'll take your workaround for a spin.
Thanks!
-w
 
Upvote 0
I think I found a welcome solution on this one.
I imported all files from a folder, sorted on created date, chose to keep only the first row, expanded the columns, chose only the columns I needed to load.
I need to test some more but seems to be working correctly and easier than passing a parameter from the worksheet.

-w
 
Upvote 0
Alternative is to filter on latest file on the column creation date. No need to sort first.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top