Percentage formatting with API
Hello,
I'm trying to automate the modification of multiple spreadsheets with the API, and I'm bringing a detailed formula to my columns. The displayed value is a percentage so I'm bringing a value between 0 and 1, but I would like to directly format the column in percentage.
I've observed on an extract after setting manually the column that I've:
"displayValue": "95%" "value": 0.949367088607595
Does that mean I need to set the value I'm displaying? As I'm calculating it, that looks to be two loops, one to apply the formula to my cell, then one to rewrite the result as a percentage which looks unconvenient.
Is there a way to set-up directly the column as percentage?
Thanks a lot,
Jérémy
Best Answer
-
You'll want to set the format of the cell to be percentage, see: https://smartsheet.redoc.ly/#section/API-Basics/Formatting
This list doesn't specifically call out the numerical format of percent, but I found another discussion on StackOverflow that details an example, see: Filling in an allocation % column and have it display nicely
In this example they used:
'format': ',,,,,,,,,,,,,,3,'
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Answers
-
You'll want to set the format of the cell to be percentage, see: https://smartsheet.redoc.ly/#section/API-Basics/Formatting
This list doesn't specifically call out the numerical format of percent, but I found another discussion on StackOverflow that details an example, see: Filling in an allocation % column and have it display nicely
In this example they used:
'format': ',,,,,,,,,,,,,,3,'
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now -
It worked, thanks a lot for redirecting me there!
Have a good day,
Jérémy
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives