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
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives