Excel Automation process

I am going to automate one of excel manual process .which is consists of empty rows,Is there anyway to remove empty rows on excel sheets ?? …looking towards replies …Thanks.

Read the file - sort (or delete) empty rows in the datatable - write the file back to Excel.

RD

1 Like

Thanks for the reply RD . Should I use sql database for this ?is there any other way without using external database .

You can do it all within uipath, no need for external database. First you must use the read rows activity to select all rows and add to a datatable variable.

Then you can use LINQ or other methods to remove rows based on criteria (in this case, empty rows). See this post for a helpful method: DataTable filtering with expressions

Here is another method that I’ve used, but I’d go with the first link I posted because it is more succinct. Remove empty row in the excel - #16 by Dave

1 Like

For removing the empty data rows ,

  1. Read Excel file through read range activity.
  2. Compare the row string with the Null value
  3. If it finds the null value then just do nothing and if don’t then copy that cell value to the “Sheet2”

Through this you will get the proper excel without null rows.

1 Like