Has anyone done a scene like this, please?
I have 100 excel documents with the same data structure and property fields, I want to merge all the excel documents into one excel document, how can I do it?
Consolidation can be done using VBA
There’s an alternative way too.
Thank you，bro. But ,I’m not familiar with VBA，how do I put these VBA code into the Uipath Activity？ Could you please show me how to do it？
First Loop to all your Excel Sheets and then Inside Loop read each excel sheet data and store it in a DataTable (datatable1)
Write an If Condition that your Maindt.Rows.Count>0 then Use Merge Data Table activity and Pass Source as datatable1 and Destination as Maindt. else Store datatable1 all the data inside Maindt by using Assign Activity (Maindt=datatable1)
Please refer this thread for a xaml
And if you are looking for a component
Thank you，Bro. Do you have more detailed instructions on how to do this? Actually , every excel file have only one sheet. I know how to loop the files , but don’t know how to merge each DataTable from each excel file…
Please find the attached screenshot of the solution
Here first we have a loop to our Excel Doc and then read one by one each excel first sheet data and on the basis of Condition we have merged our data in the main data table
it is too hard for me . Can you show me a Demo.
Thank you so so much。。
Your demo can achieve the effect I want, but I follow your demo and it says maindt is empty and reports an error.
Please use the Updated one I have attached after a few modifications and make sure you have initialized the maindt with New DataTable() in variable panel , if you are still facing the issued share the error screenshot
This error has occurred because you haven’t initialized the mainDT variable with New DataTable as Default.
See the below-attached screenshot
Great, thank you so much, I’m a newbie , so I aways make mistakes…is new DataTable（）a method which means create a empty DT？
No Issue we are happy to help
Exactly it means that you are initializing the DataTable with Empty DataTable before going to use it.
Thank you ，you are great Uipath master！
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.