How to clear Excel Sheet using Uipath

Hi Everyone,

I would like to ask how can I clear my excel sheet data using write range? without using the method of VBA.

image

Hope anyone can help me

Hello @Hey_hi You can use Delete Range to clear the excel sheet data. Refer attached workflow

Example.zip (10.1 KB)

Hi @ushu , I have tried running your problem and it seems there is an error

@Hey_hi Can you share you excel sheet screenshot

@Hey_hi Please try changing the range within the delete range activity

Ex: if your excel has A:G columns then change that accordingly in the code

@ushu

@Hey_hi For Read Range did you enable headers.If so, then disable and try it

1 Like

Or Else
Write Cell Activity
Range : “A1:F”+(DT.RowCount+1).Tostring
Value : “”

1 Like

Hi @Hey_hi

Have a look on it

Regards
Gokul

Use Build data table make sure no value should be there. Then use writerange activity uncheck headers if you don’t want.

Hi,

Use clear data table activity and pass the datatable name.

Thanks,
Lakshmi

1 Like