0

I'm trying to format a cell as Currency via Excel JavaScript API. I've tried currency and $ but neither work.

What do I need to do?

var Rev_Rng = ws.getRangeByIndexes(2, Header_Arr.indexOf("Est. Revenue"), Used_Rng_And_Props.rowCount - 2, 1)
Rev_Rng.select()
await context.sync()
Rev_Rng.numberFormat = '$'; //This just inserted '$' as the value I also tried 'currency'
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
FreeSoftwareServers
  • 2,271
  • 1
  • 33
  • 57

1 Answers1

2

Try to use something like that for the currency format:

"$#,###.00"

See Number format codes for more information.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45