Error when adding new Row to Google Sheets at a Given row

I’m using the code mentioned in this article:

{
    "requests": [
        {
            "insertDimension": {
                "range": {
                    "sheetId": Cici,
                    "dimension": "ROWS",
                    "startIndex": 10,
                    "endIndex": 11
                },
                "inheritFromBefore": true
            }
        }
    ]
}

But I am getting the error here:


@Donald_Mitchell Please help here if you can :pray:

Hello @Abdo,

What is your end goal here?

You’re getting this error because Cici is text and should be surrounded by double quotes.
“sheetId”: “Cici”

However, this parameter may not accept strings, so if that doesn’t work either, supply the index of the sheet instead, a number NOT surrounded by quotes. So if Cici is the first sheet, then use:
“sheetId”: 0

If it’s the second sheet, use:
“sheetId”: 1

3 Likes

I’m trying to add a row in between 2 rows in any of 30 tabs inside a google sheet.

When I tried a number (4) and when I tried “Cici” with “” - Both times I got different errors
image