Deleted file excel if is empty

Greetings to the whole community

I have an excel file that is overwritten every 5 min, but sometimes it is empty or blank and at the time of copying from one folder to another I should not copy the excel that is empty or blank.

Hi, i guess you have two options, before moving the new file, check one of the 2, size or content of cell A1…

would be for the contents of cell A1

So you dont have anything written yet for your process?

It’s something extra, the process of taking the excel and copying only those that have content is where I need help

if file is empty
then not copy file
else copy/paste file in path uipath

Hi Sebasthian,
For checking the file if it empty or not Please follow the process:

  1. Read the excel file that you are going to copy.
  2. Check the data rows in the datatable that was created from step-1.
  3. If the data rows are more than 0(Whatever the number that you decide based on the number of columns), it has data in it and accordingly you can make a decision.

Hope this helps. If not please follow this link

Thanks,
Praveen

2 Likes

@Sebasthian_Arias

Read the excel and find the number of rows.
use IF activity to check no of rows is more than 1 or not. if more than 1 process it as per ur requirement else delete the excel.

Hope this would help you

Happy Learning!!

Thanks
Mani

This is my proposal to read the excel - Thanks!

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