How to open and read multiple excel files (more than 30) and select certain columns


i am writing a seemingly simple but actually not! program to open and read many excel files (they are identical in column names but not in file name and number of rows). I’d like as an output:
a) certain columns only (3)
b) files names as additional column so total 4 columns

thanks in advance!


Please follow below approach,

// Create string array variable
strArrFiles = Directory.getFile(“youFilesPath”, “*.xlsx”)
// Use for each activity to loop them one by one
For each file in strArrFiles {
// Read your excel

tks for yr reply. sorry , i am a novice and non-technical guy. could you be more specific on which functions in studio to call for?

Hi ,

You can find assign activity in the activities pane , where you have put the values as shown below,

Left part of assignment : fileList (create this variable as array of strings , which can be selected in the variable pane)

Right part of assignment : Directory.getFiles(“Source Path”,“xlsx”)

Now take for each activity from the activities pane and in the right side box keep the above created variable(fileList) and inside the body of the for each use read range with item variable

tks @ Krishna,

possible for you to have a screenshot of the .xaml program proposed?

CompileStudentInput.xaml (7.8 KB)
I tried this, but still not producing anything