Hi Guys,
As the title entails, I have successfully saved an excel file.
I want to then read it and store it in a DT.
I’m facing challenge on how to reference this folder path dynamically.
My understanding is sometimes when clicking “save” a file button, the default destination can sometimes be on Download folder or Desktop.
Even if I designed the folder path for the download to under Download folder, the name of the pc would be different for each user (see ss2).
I’m intending that this project to be used for someone else (not just me) and hence the need for it to be dynamic.
If you can help to provide some workarounds. Cheers!
You can use this to dynamically reference the username and the subsequent folders:
Use an assign to capture the following information into string variables:
str_Username = Environment.UserName
str_Filename = 'Your_TempFile.xlsx" (or whatever you want)
str_Full_Path = “C:\Users"+str_Username+”\Downloads"+str_Filename
Then try typing into the save location field:
str_Full_Path