Clear the sheet, before writing data (Write Range-Excel application scope)

I am using “Write Range” inside Excel appliation scope to write data inside sheet, so that the Excel should be opened while I am writing data.

Previously I was using “Write range workbook” and it was automatically deleting the previous data from that sheet and replacing it with the new one

How can i achieve that in this activity

Both Write Range activities will overwrite what’s there, assuming you’ve given it the proper starting range (ie A1). You shouldn’t have the Excel file open when either of these are running.

Hi @Sami_Rajput ,

You could also try with the Modern Excel activities :
image

Another way to Clear the Sheet using the Previous Data Range and Write Cell activity :

1 Like

Hi @Sami_Rajput

Instead of using the classic activities use the modern activities of excel. Go to Activities panle → Click on filter symbol → Enable the modern.

Then the modern activities will appear in the activities panel. Now, take the use Excel file activity and pass the excel file path, inside use Excel file activity insert the clear sheet activity to clear the data in the sheet.
After that use the write datatable to excel activity to write the datatable to the excel sheet.

Hope it helps!!

Hey,
If you are using Use Excel File in that Excel Process Scope check Save changes in Excel file.
Hope it helps!
Cheers
Temuulen

image