Hi all, how can I read in several different excel files using the Directory.GeFiles function in conjunction with a ForEach item In loop?
The files I want to read in have a specific name such as:
test1.xlsx
Test2.xlsx
Test3.xlsx
…
I do not want to read all files but in this example only Test1.xlsx and Test3.xlsx.
Directory.GetFiles(YourDirPath, “Test*.xlsx”) for a prefiltering
Or
Filtering before for each e.g.
arrFiles = Directory.GetFiles(YourDirPath)
arrMask = {“Test1”,“Test3”}
arrFilesFiltered = arrFiles.Where(Function (x) arrMask.Any(Function (f) x.Contains(f))).toArray