Read excel from a given file folder

Error occurred
Object reference not set to an instance of an object

Could you share a screenshot of the error and tell us at what point its occurring?

merge datatable.xaml (8.1 KB)

Take a look

I did some changes… There were few things that need to be done… Check out the workflow below. I have added few comments in places where I did the change…

This should work for you

merge datatable.xaml (9.9 KB)

If this works, please mark the answer as the solution so it will be helpful for others as well :slight_smile:

happy automating…

Sorry, doesn’t work
It didn’t combine all the excel files together. Conversely, it simply copy row 2 number into row 3 in each file(only 3 rows in my each excel file, row 1 is title, row 2 and row 3 are different numbers)

Hi… I’m sorry… my mistake…

This is working fine. And it adds all the data in excel files into one file… Check it out…

merge datatable.xaml (9.8 KB)

Sorry again for the previous one :frowning:

Hope this one helps you to get it to work :slight_smile: I got data from two excel files and added the data of those two into one… That worked fine over here…

Let me know how it goes…


Still some small problems
In my files all data are written in A and B column
but in final report, first file written in C and D column, second one written in E and F and third one written in G and H column
Is there a way to write all data in A and B column?

Others are working well

Can you share your write range activity to check

Here is the output result
I only change the working path of write range activity

Nope. I want to see your write range activity… and its configuration… the point it is used… Just to see why the columns are changing

merge datatable (2).xaml (9.8 KB)
I only changed workbook path


I don’t understand why that happens. I tried executing the same workflow you sent… But it works fine for me… Do you mind sharing your set of excel files? If that is okay with you? I’m wondering whether its due to something in the excel file itself… Ideally when you specify the column in write range, it should only enter in that set of columns…

If you are able to share the excel files, I can check how those work in mine over here…

qw - Copy (2).xlsx (8.2 KB)
qw - Copy.xlsx (7.9 KB)
qw.xlsx (7.9 KB)
Here they are
By the way, did you change some default settings on your Uipath Studio?

I tried those with mine… It worked perfectly…

Regarding the default settings, I did not change any default settings in Studio… Wonder why that’s happening…

@nimin, @nadim.warsi, if you have any idea to why this is happening, would be glad if you could share some thoughts here… I only know few guys by the name yet… So I added the names of guys I remember :slight_smile:

Its working as expected.
Can you delete your finalreport.xlsx file and run the process again?

Sorry, doesn’t work. My colleague run it have exactly the same problem

1 Like

Can you do this.
Add a breakpoint on your write range activity.
Run your process in debug mode and when it breaks in the Panel can you give me the the screenshot of your MainDT variable? Something like this.


hey @mightsuccess
I think the files you gave us before is bit different than what you have tried bot on…
if possible can you upload those files as well…


Only some other files and file folders (no excel in those sub file folders)
Here is the executing result of it
If you can take a look

yes, seems the file structure is not the same for all the files.