How can I delete excel sheets in OpenRPA?

I am using Write range activity to write data into excel but when I add a dynamic name for “Worksheet” it creates a new sheet and writes data into it, but the problem is “Sheet1” stays there and other Worksheets with my Dynamic names gets created which is great, so how can I delete that “Sheet1” or just somehow start to write my data into this Sheet1 and so on?

hmm, that is a tricky one … i never created an “get sheets”/“for each sheet” activity, so you will need to use invoke code, to talk to PIA directly yourself.

I don’t have access to Office anymore, so i cannot create some working code, but hopefully this code should give you an idea on how you can open an excel file and get the workbook object

then you basically just use

workbook.Sheets["Sheet1"].Delete();

Okay got it, thank you.