Hello,
I want to insert rows into a Google Sheet, but I want the new rows to contain the same formulas as the existing rows in the sheet.
I can't do this using Google Sheet nodes.
So I tried using an HTTP request, but I can't create the call correctly.
Here is a simple example below
I would like to insert a row between 3 and 4, with column E4 containing the formula. I would also like the row with the asterisks to become row 5.
| | A | B | C | D | E |
| --- | ---- | --------------- | ---------- | -------- | ----- |
| | id | date | nom | age | |
| 1 | 1 | 12/12/24 | jean | 12 | 1 |
| 2 | 2 | 01/01/25 | eric | 15 | =D1+1 |
| 3 | 3 | 03/02/25 | pierre | 18 | =D2+1 |
| 4 | *** | | | | =D3+1 |
I put this in the body of the HTTP request but got an error: ‘The value ’[object Object] ‘ is not supported!’
{{ {
"requests": [
{
"insertDimension": {
"range": {
"sheetId": Number($json.sheetId ?? 0),
"dimension": "ROWS",
"startIndex": Number($json.row_number),
"endIndex": Number($json.row_number) + 1
},
"inheritFromBefore": true
}
},
{
"copyPaste": {
"source": {
"sheetId": Number($json.sheetId ?? 0),
"startRowIndex": Number($json.row_number) - 1,
"endRowIndex": Number($json.row_number),
"startColumnIndex": 0,
"endColumnIndex": Number($json.nbCols ?? 26) // exclusif
},
"destination": {
"sheetId": Number($json.sheetId ?? 0),
"rowIndex": Number($json.row_number),
"columnIndex": 0
},
"pasteType": "PASTE_FORMULA",
"pasteOrientation": "NORMAL"
}
}
]
} }}
Somebody could help, please ?