Using Copy Sheet API to copy column data and not formulas ?
I am trying to use the Copy Sheet API call to take a snapshot and archive on a weekly basis what has been entered into a source sheet. The source sheet has many formulas but I only want the data copied over. So far the source sheet is getting cloned over with formulas. I cannot have the copied formulas in the target sheet updating archived data.
Is there a way to call this API so only pure data gets copied over and not formulas?
Answers
-
@JohnL I'm not familiar with the entire Copy Sheet call in the API, but if you copy row by row, Each cell should have a "value" and a "displayValue" property. the "displayValue" property should strip out the formula?
Darren Mullen, join the Smartsheet Guru Elite
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
-
I couldn't find any API command to copy a whole sheet with no formulas, If it is that actually the case, and you really have to remove the formulas, you would have to do it column by column,
Get sheet
Get first row (here the formulas reside)
Recursion to get each cell, update each cell where the formula parameter is not '' with ''
Done.
The only disadvantage of this process is that is very costly, in resources and time.
This works only for column formulas, if you have different formulas all over the place, then you will have to do a recursion on every single cell of the sheet.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 412 Global Discussions
- 221 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 461 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives