I read an Excel sheet, then delete rows and finally write it back to the sheet.

**Problem:**

Using write range only the length of the new table gets replaced and on the bottom there are still rows from the old table. Is there a way to replace a sheet as a whole (including empty rows) or is there an option like “empty sheet”?

e.g.

**Sheet 1**

Row 1: A B C

Row 2: D E F

Row 3: G H I

Row 4: X Y Z

**Sheet 2**

Row 1: A B C

Row 2: D E F

Row 3: X Y Z

-> If I replace Sheet 1 with Sheet 2, I want only the values of Sheet 2 but I then see the row with X Y Z twice.