Delete data except header in excel

uiautomation
activities

#1

Thanks in Advance


#2

@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


#3

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


#4

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:


#5

@tgopalas

you have to check the add headers in read range activity

Regards,
Mahesh


#6

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


#7

@tgopalas

Write it in different excel sheet.

regards,
Mahesh


#8

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


#9

@tgopalas

Now is it working


#10

No @MAHESH1


#11

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


Clear worksheet