Excel Automation process

excel

#1

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.


#2

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

RD


#3

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


#4

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: Remove empty row from table using linq

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


#5

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.