I have a folder on my desktop and I would like to get the filenames listed in an excel file.
Currently I have an assign activity where variable fileList = System.IO.Directory.GetFiles(“C:\Users\XXX\Desktop\YYY)”
I defined the FileList variable as an array of strings.
I am now struggling to get them listed in an excel file.
I tried using “for each” (for each item in fileList) but then I am kind of stuck… should I use the activities “write cell/write range”? If yes what range do I have to specify if I want it to loop and enter all filenames one by one, on a new excel row?
Hi @yannip,
You can use the write range. But before that
1.Use the Build data table activity with one Column name
2.Inside the for each add the row data by using of Add data row activity .
3.Finally use the write range activity to write into an excel file.