Forum Discussion

MB6F's avatar
MB6F
New Member
3 years ago
Solved

Power Query file directory with links to files

Hello everyone,

 

I hope that you're all well and in good spirits!

 

I am not from a pure computing background but am reasonably capable in using all of the Office 365 products. 

 

I am, however, completely new to Power Queries and have, probably, done what most people do and looked up solutions to the particular task that I'm trying to complete. 

 

In short, I am trying to use Excel to create a file directory that be be used anywhere in my filing system.

 

I have already managed to create an Excel file using Power Query - I have coded it so that it knows where it is. (Yeah)

 

I have used the Power Query transform functions to arrange and present the file name, extension, filepath and dates. However, I want to add columns that will include hyperlinks to each of the files and also the file's folder. That would, of course, make it simpler to navigate to the documents in the list, no?

 

I've tried adding a Custom Column and added text along the lines of ="=HYPERLINK(""[Filepath]&[Filename]&","[Filename]")".... the text appears on screen correcty but when the data is loaded, the hyperlink is not recognised by Excel. 

 

Having the output in a table is definetly helpful for quick filtering.

 

Is there a way to make this happen in Power Query formating? Or by using M code? Or would it be better/easier to run a macro to achieve this after the data has loaded?

 

Any suggestions or signposts to ways of achieving this would be gratefully received.