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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
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
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives