I am using Google spreadsheet service to retrieve data from Google spreadsheet.
I have column with price. I want to display price with comma
e.g. 40550
is represented as 40,550
.
On Google spreadsheet, when I check cell value, it doesn't have comma in it, it just display comma on UI.
But when I download spreadsheet with API, Cell data has comma in it.
Is it issue with Google spreadsheet API or it's how actually data is stored on Google spreadsheet?
答案 0 :(得分:0)
For now I created workaround. I also put type of value in column. So for integer type, I just strip comma.
But it would be nice to know if actual data stored on google is different than what is presented on spreadsheet UI.
答案 1 :(得分:0)
You can use '{:,}'.format(40550). This will return '40,550'