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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives