0
votes

I have a nodejs app which uses the google sheets api to update and add new rows to a spreadsheet. Now I want to update the range of all conditional formattings if a new row was added. I know there is a updateConditionalFormatRuleRequest for batchUpdates, but I think I can't use it for that. The first problem is that I dont know how to get all conditional formattings of a sheet to update them. My only idea is to count them manually for each sheet and then make a for loop with this number. The second problem is that I dont know how to update just the end row of the range. Because I think I have to submit a full GridRange Object and not only the endRowIndex. And if I do it with the for loop, how should I know the column of the current conditional formatting. My other idea is to delete all conditional formattings and add them again with the new range. But then I have to code all existing conditional formattings now, and that are many. So is there a better way how I can make all conditional formattings over all rows, even if there will come a new row?

1

1 Answers

0
votes

To make all conditional formattings over all rows, even if there will come a new row apply whole column references. Instead of say $A2:$A9 apply $A:$A.