How to get sheet id from a spreadsheet


I need to retrieve the unique sheet ids of each sheet present in a spread sheet.
For example this : 1SiwX3hApM_SB-jUIXE6_-pfykNVvA_9UT3ONwR04Vo4/edit#gid=430182552

The spreadsheet is dynamically created in the code and it has multiple sheets.
The aim is to retrieve the ids of each sheet of the spreadsheet in a variable.

Any help would be appreciated on this topic.


Hi @yogendra.kulkarni

Hope this link is helpful

Hi Aditya,

Thanks for your quick response.

Actually I do not need sheet names I am using google sheets so I need the sheet id to be retrieved.
I was able to get the sheet names before.

Hi @yogendra.kulkarni

Did u tried this


Nived N :robot:

Hi Yogendra , I am also facing the same problem .To retrieve dynamic GSheet ids . Did you get the solution to retrieve dynamic GSheet ids

Hi Dutta,

For a sheet that you create in studio I could not find so I used the sheet Name as indicator for the user.

But for the sheet is already created before you can use the link
in which you can replace ID by spreadsheetid and GID by already created sheetid