How to combine many excel tables into one excel table

we have a share point area and there are 50 files in it, in every file there is one excel table, our sales team write on it every day, and we have to merge it (inferior)

could you help me how can i do that?


1 Like

Hi @ersin

Welcome to UiPath Community! :slight_smile:

I think a component created by my friend @Lahiru.Fernando can do what you need.
Kindly check the component here:

Thanks and regards.


Thanks Jan, can i find any xaml version of it?

Welcome to uipath community

Hope these steps could help you resolve this
—kindly make sure that we have that share point synced to our system drive so that we can access that folder
—now use a assign activity and mention like this
arr_filepath = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)
Where arr_filepath is a string array variable

—use a build datatable activity and create a datatble with similar columns we have in all the excel file and get the output with a variable of type datatable named Finaldt

—now use a for each activity and pass the above variable arr_filepath as input and change the type argument property as string in the property panel of for each loop activity
—inside the loop use a excel application scope and pass the file path as item which actually holds now the file path from variable arr_filepath
—inside the excel application scope use a read range and get the Output with a variable of type datatable named outdt
—next to this excel application scope use a merge datatable activity (while still being inside the for each loop) where the source property can be mentioned as outdt and destination as Finaldt in the property panel

—this will merge the datatble read from excel to the the datatable that we have made with build datatable activity
But make sure that all the excel files have same set of columns and same order of columns

—and finally next to this for each loop use a write range activity from workbook activities and mention the input as Finaldt and mention the sheetname and range as “” and file path of excel where we want to write

Hope this would help you
kindly try this and let know for any queries or clarification
Cheers @ersin


Welcome to the community!!!

Try it ourself, I’ll say as it will help you out with the execution and understanding the tool :slight_smile:


Good morning Ersin,

I would use an activity to get a list of all the Excel files in your directory and then implement a loop goes through each file and uses the “Read Range” activity to read the Excel tables and then merge them using the “Merge Data Table” activity.

When working with SharePoint, I’ve found it MUCH easier to work with files/directories if you have access through the file explorer. You may need Windows Experience installed for this to be possible.


Thanks:) but it doesnt work. there are 52 files in my share point area and it doesnt work:(

Hi @ersin

You are merging the sheets together right ???

yes, they are in our share point area, and these excel tables are in seperata folders.
there is only one excel table in every folder, and i want to merge them in one table (inferior)