I am building a script (accessed through a custom menu item) that will also include some styling. Things like setting background colours, changing the width of columns, the heights of rows and inserting a lot of content.
Now I would like to implement a 'reset'-function: set all cells back to what a default, empty Google Sheet looks like, including all content. I found the clear()
function in the documentation, but this only removes the content while keeping the width/height the same.
The question: How can i reset a modified spreadsheet (content, width/height, styling) back to looking like a default Google Sheet spreadsheet?
I think, this plan should work:
getColumnWidth(columnPosition)
and getRowHeight(rowPosition)
setColumnWidth(columnPosition, width)
and setRowHeight(rowPosition, height)
For more info look at Class Sheet documentation