Multiple files

Good morning please assist im trying to read/process multiple files 1 by 1 but is only reading one file.

And the message is unable to send i dont know whats wrong

Because im using the message that is on the excel file

Hi @pabaleloh

Could you be more specific. Your query is quite confusing

Okay sorry about that im trying to send messages to clients where by every excel file comes with numbers and messages so i have to process the multiple excel files 1 by 1

So i used this solution but is reading one file multiple times and i have 3 files in the folder…


It may not be root cause, however CurrentFile.ToString should be modified to CurrentFile.FullName because former returns only filename without path. For now, can you try it?



Okay @pabaleloh

Try giving the filter in the for each file in folder activity. If the files are xlsx then give the “.xlsx" in the Filter by field, if those are xls then give the ".xls”.

After for each row in datatable activity insert clear datatable activity and pass the DT1 variable.

Try the above two suggestions, If you are getting any error let us know.

Hope it helps!!

@Yoichi Still doing the same


To isolate cause, can you try to put LogMessage activity with CurrentRow.FullName, then check if the filename is all the same or not?


1 Like

@mkankatala Now is reading the files one by one but is not getting the message from the excel file

In every excel the Column names will be same or they might be any change… @pabaleloh

If any change in the column names then we have to use the column index to get the values.

Show your excel file how it looks like.

They will be the same the only different is dates

I am not asking about the file names, I am asking about the Column names in the each excel file… @pabaleloh

Send me some of screenshots of each excel sheet or you can share the excel files if it doesn’t have confidential information.

Okay @pabaleloh

Then instead of using the Column names use the Column index. Check the below one,

- Assign -> MobileNumber = CurrentRow(0).toString
- Assign -> Message = CurrentRow(1).toString

Modify your assign activities as above.

Hope you understand!!

@mkankatala thank you so much but im still getting the same error so i will try to fix it

May I know the error what you are getting… @pabaleloh

@mkankatala Im sorted thank you but now im trying to delete one excel file after processing it but it does not work “access to the path is denied” or do i have to add something after the path?

Don’t continue the query in the same loop. Create a new post and you can ask your query there… @pabaleloh

Happy Automation!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.