PowerQuery Text File Extraction - Set to Ask for File name on Refresh?

dls0406

New Member
Joined
Oct 7, 2019
Messages
15
Disclaimer - I am a new user.

I have created a powerquery that pulls in a text file and performs several formatting steps before close&load to an excel file. The problem is, that each month, I need to change the text file that is being pulled into the powerquery. (The file is emailed to me from an external source). Now, I know I can manually edit the query source and select a new source each month. However, I was wondering if it was possible to have excel ask for a new file each time I hit "refresh"?


I see that if I use legacy text import, I can do this, but I dont see an option when I use regular text import. And if I use the legacy text import, then I cant seem to figure out how to make the formatting changes within the same query. Any Ideas?
1579103670791.png
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
maybe try From Folder option
in this folder replace old text file with new then refresh query
 
Upvote 0
I guess there is no way to re-promt each time? I am not the exclusive user of these files and the locations where they are saved, so it would make more sense from my standpoint if I did not have to create new folders. Though if thats the only way it may be a use-able work-around
 
Upvote 0
create ONE folder where you put text file
in the SAME folder replace old text file with new

you need only re-create your query to this option: Data-New Query-From File-From Folder once
then after change text file in this folder - refresh query (every time if text file will be changed)
 
Last edited:
Upvote 0
Yes I understood what you meant, which may be a decent workaround if it is impossible to do what I had hoped. Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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