I am looking to do some things in Apps Script, and wanted to see if adding a new row at the top (after the headers) of the Balance History sheet using the `insertRowBefore()’ function would break anything.
I have it figured out, and am going to post here in case it is useful for someone else. There is probably a more elegant way to do this, but this works.
//add a row in the 'middle' of the balance history sheet
balanceHistorySheet.insertRowsBefore(3,1);
//copy the existing first row down a row
balanceHistorySheet.getRange("A2:M2").copyTo(balanceHistorySheet.getRange("A3:M3"), {contentsOnly:true});
//clear the now-duplicate first row
balanceHistorySheet.getRange("A2:M2").clearContent();
//copy the new balance history entry that I want at the top