Delete data except header in excel

Thanks in Advance

@tgopalas

Read the excel sheet by using read Range, and assign it to dt,
then use clear datatable activity.

Note: while reading check Add Headers in ReadRange activity.
Then use writeRange Activity to write in excel sheet

Else After reading excel sheet you can use assign activity
use like this
dt=dt.Clone
Then use writeRange Activity to write in excel sheet

Regards,
Mahesh

2 Likes

headers.xaml (10.8 KB)
@MAHESH1
I have tried the same…but didnt work…can u please check the xaml file

Hi @tgopalas,
use of Excel application scope
Use read range Read range get as a datatable.

shortcut keys
ALT + E + L or
ALT+H+D+S
Use send hotkey activity to make use of them.

Use Clear DataTable Activity to clear the data.
Write range to write in the excel sheet.

Regards,
Arivu :slight_smile:

1 Like

@tgopalas

you have to check the add headers in read range activity

Regards,
Mahesh

2 Likes

I have checked and tried…but didnt get…But the xaml file i have send …in that ive unchecked

@tgopalas

Write it in different excel sheet.

regards,
Mahesh

Yaa…done the same…but i dont know whats gone wrong in that

@tgopalas

Now is it working

No @MAHESH1

One workaround is add an empty row and write range with Add headers. Make sure the empty row doesn’t impact the downstream process.

image

image

1 Like