Skip to content
Advertisement

Add row in google Spreadsheet with javascript

Adds the value below the line created earlier. I’m trying to get me to add a line at “2:2” and put the value on that line, and the other values ​​stay below. The maximum result I got so far was to make the new line erase the old one and paste the new value in the same field.

JavaScript

Any solutions to add a line and paste the values ​​in 2:2 and the old values ​​underneath?

Advertisement

Answer

Use insertRowAfter()

Script:

JavaScript

Sample data:

enter image description here

Output:

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement