Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
API write over a sheet
Hey, I want to feed my sight/report with a sheet refreshed once a day, however I'm not able to find a way to write over a sheet so that the sheetId remains the same. There are too many possible changes to use updateRows, as some of the rows could be removed and/or added as well as updated. Is there a way to write over sheets?
Comments
-
Never mind, I found a way, by deleting all the existing rows and then adding all the new rows. It's not pretty but it works like a charm!
-
Hey Gareth,
Glad to hear you got that working. That is the process I would suggest if you are looking to have the sheetId stay the same and write over all of the existing data. Don't forget that the Delete Rows endpoint supports bulk operations, so you can send multiple rowIds at once to delete them in bulk.
You could consider creating the new rows indented one level under a parent that you craete at the top of the sheet each time. Then when you are done you can delete that row and all of the child rows will go with it.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives