Delete Range Activities

Hi there,

I was about to delete entire excel cell in my excel sheet. So now I’m using Delete Range activities to execute my workflow. But what am I going to put in for this range column? Or is there any other ways to delete the entire cell and make the excel sheet become blank?

Capture

Thanks and best regards.

You mean , you want to delete all the cells in excel and make it blank and remain only with the headers right? We have clear data table activity where it will clear all the data in that data table. so read the excel and store in data table. then use clear data table activity and then write it back to excel.

Or

Use the delete range activity itself and count for the rows and columns by reading the excel and storing in the data table.

  1. You will get row count as datatable.rows.count
  2. Column count as datatable.columns.count
  3. Convert the column count to alphabet using Convert.ToChar(64 + columnCount) and store in variable as columnString
  4. Provide the range as “A2:” + columnString + rowCount.ToString which will delete the cells from A2 to the end
4 Likes

Hi @yushinchan,

Delete_Excel_cell.zip (23.6 KB)

Please check this
Regards,
Gulshiyaa

Hi, could you explain more about:

  1. You will get row count as datatable.rows.count
  2. Column count as datatable.columns.count

How to do it? for example if I want to delete all data from row number 6 to end (for all columns).
Thank you!