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.