Clear Data Table value

How to clear data table ?
Set variable (tablename) to empty/clear?
image

@flashdrive07

check this reference

Hi @flashdrive07

Dt.Clone()

Regards,

Hi @flashdrive07

You can use the Clear datatable activity.
image

Hope it helps!!

I want to retain the headers, and clear all the rows

clear data table activity is not available in Studio X

@flashdrive07

Try this

It will clear all the rows except Column Headers

Dt.Clone()

image

Regards,

Okay, then try to do it with expression… @flashdrive07

Do you want to clear all the data with headers you can use the below expression then it make it new,

- Assign -> DT = New Data.DataTable()

Check the below image by using above expression,

If you want to clear the rows and keep the header use the below expression,

- Assign -> DT = DT.Clone()

Check the below image by using above expression,

Hope you understand!!