I'm trying use google apps script to format a range of cells in google sheets. The cells currently have a number in them like "1000", and I want them to be formatted like "1,000 lbs". I know in sheets you can use the custom number formatting and simply use "###,0 lbs" to get the desired outcome. However, I need it to work in google apps script. Also, I don't want to just add a string " lbs" to the number, I want the range to be formatted with " lbs" in it.
I thought I could use the method setNumberFormat("#,##0 lbs") in the Range Class, but it displays the error message "Service Error: Spreadsheets". Please Help