How to empty a sheet with 8000 rows

Hello,

We have a big excel file that we need to auto update on smartsheet. For that, I use the node js API and it's working well.

I run this each night. At one moment, it can't run because the sheet is full ( max row is reached ) so I need to empty the sheet before sending new data.

I need to keep the same ID of sheet, so I can't just delete it and create a new. Or deplace row to another sheet, because at one moment the "trash" sheet will be full too. I really need to empty the sheet like you do in the web interface by selecting all, right click and delete.

I tryed to use https://smartsheet.redoc.ly/tag/rows#operation/delete-rows but it don't work because there is too much rows and I get a timeout, or it's a very long action ( more than 2 hours ) and fail at one moment. I searched for third party app like Zapier but no one can empty a sheet.

So my question is, is there a way to empty a sheet ?

Thanks,

Answers