Skip to content

SheetId for Dashboard sheet #5

@shirgazee

Description

@shirgazee

Hello!
I'm trying to query named ranges through Google Sheets Api and response seems strange to me. r_DashboardData doesn't have a sheetId field and Dashboard sheet has its sheetId field set to 0. Therefore I can't reference Dashboard sheet by the named range and build an A1 notation request to Google Api to get dashboard data.
Is it possible to set Dashboard sheetId manually in spreadsheet? I hope it can be a small fix 🙂
Here is a simplified Google API response:

{
  "sheets": [
    {
      "properties": {
        "sheetId": 0,
        "title": "Dashboard",
        "index": 2
      }
    },
    {
      "properties": {
        "sheetId": 925237105,
        "title": "Transactions",
        "index": 3
      }
    },
    {
      "properties": {
        "sheetId": 968129680,
        "title": "BackendData",
        "index": 11
      }
    }
  ],
  "namedRanges": [
    {
      "namedRangeId": "xdpqma8z76l8",
      "name": "v_Version",
      "range": {
        "sheetId": 968129680,
        "startRowIndex": 1,
        "endRowIndex": 2,
        "startColumnIndex": 41,
        "endColumnIndex": 42
      }
    },
    {
      "namedRangeId": "c3auhv3oqv4e",
      "name": "r_DashboardData",
      "range": {
        "startRowIndex": 5,
        "endRowIndex": 105,
        "startColumnIndex": 5,
        "endColumnIndex": 16
      }
    },
    {
      "namedRangeId": "ep1iuo1vxvjg",
      "name": "trx_Dates",
      "range": {
        "sheetId": 925237105,
        "startRowIndex": 8,
        "endRowIndex": 3000,
        "startColumnIndex": 1,
        "endColumnIndex": 2
      }
    }
  ]
}

P.S. It may be that Dashboard sheet is a default one with a sheetId of 0. I did find some confirmation on this https://stackoverflow.com/a/62568335 but it's not from official docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions