Extract sheetID from rows on report Smartsheet API
Is there a way to obtain the sheetID, for the Smartsheet API, for each row found on a report?
I have a script to make modifications to sheets using the Smartsheet API. However, I had to locate the sheetID manually by accessing every single sheet and going to its properties. Is there a way to use the Smartsheet API to make a GET and obtain the sheetID for every row that appears on a report? Currently I am able to GET every row from the report and the cell information, but I want the sheetID so I can make a list and run my script faster.
Best Answer
-
Thank you @Genevieve P. for your response. I was looking for some automated way of completing this. I used the API documentation and Python code to create a script to extract the IDs from the response of the Get. I have this on my github. So this code automatically extracts the sheet ids from a report and puts them on a csv. This csv can be used as values for an update to the sheet, etc.
Answers
-
Yes! The response from Get Report includes the Sheet ID for each individual row. Here's a sample response:
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
Thank you @Genevieve P. for your response. I was looking for some automated way of completing this. I used the API documentation and Python code to create a script to extract the IDs from the response of the Get. I have this on my github. So this code automatically extracts the sheet ids from a report and puts them on a csv. This csv can be used as values for an update to the sheet, etc.
-
Thank you for posting your solution!
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
@Genevieve P. Of course. Once I familiarize myself with GitHub some more and ensure that I dont expose some of my private data, I will make my smartsheet workspace on GitHub public because I have not seen many posts online providing assistance on using the API with Python. I have found that this Python approach provides a lot more flexibility that Control Center does not offer, especially when fixing issues on already provisioned projects that cant be done with Control Center, like column alignments, Multi contact or select picklists, sheet summary changes, etc.
My latest project with the API is extracting sheet ids from the report into a csv, using those ids in a loop to get the sheet summary fields and their ids to make updates. Powerful stuff, very interesting.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 72 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives