I want to be able to change where the target designation is for where a Query, retrieving data from a txt file for referenced entry into an excel document.
I know how I can go into the power query editor, go to the advanced editor, and manually change the file path for whatever I want... "C:\Users\Etcetera\File.txt" And I do this to preferably update the source reference, because the power query is taking numbers that are divided by tabs, which for whatever reason just adding a reference to text/csv files refuses to accept tabs as dilimeter, and formats all the numbers as text... but, if I go into the power query, I could split the columns, tell it to split by tab and suddenly it worked... and then tell it the format of each column is decimal numbers instead of text. But, either I have to go through this every time I want to set it up to reference a text document, or if I could just change the source reference.
In the Advanced Editor I have this line:
Which if I update that pathway then it updates where it pulls data from.
I would also like this associated with a worksheet change code - so I just have to type the file pathway in a cell and it updates the advanced editor.
Obviously the ListObject.QueryTable.Source is not correct... so what would be?
Thanks
Bookmarks