Clear all data rows from a Google Sheets

What's the simplest way to clear all the data rows from a Google Sheet like this from Retool?
I just want to preserve the top (header) row.

I know there's a 'Delete Row' function that allows me an equals filter, but if it also had a 'not equals' filter then I'd use that to delete all rows that are not blank.

Thank you

Hey @Raj, the simplest way is to just run an Update a spreadsheet action query and pass it the column headers with empty strings as values. If you don't add anything in the Filter by fields, then it will update all rows.

This query

Cleared all rows in the sheet and left the headers

1 Like

That sounds like the perfect solution - thank you @joeBumbaca!

1 Like