Thanks this works in getting the datatable sorted, but when I write the data table on the same excel sheet the remaining rows stays back… if I write on a different sheet it is fine. Can you tell me how can I write on the same sheet from where I am picking it up.
You need to first clear the Excel sheet. As read range will just overwrite the already present rows. Use hot keys to clear the excel sheet first then use a write range.
Below are the steps
Use Excel Application scope
Select Range ->Menstion the sheet name and Range->“A1”
use Send hot key → ctrl+A (Provide selector to the excel sheet)
use Send hot key → delete
use Send hot key → ctrl+s
Then use Write Range with your filtered DataTable.