C # excel column format

0

I'm trying to format an excel column for the currency format.

excelWorksheet.Range["S1", "S" + linhas].NumberFormat = "R$ #.###,00"

However, this causes you to format "RR $ 3500.00".

In the cell is 3500 and I would like it to be: $ 3,500.00 that doing on the hand would be changing the data for currency and the symbol for R $.

Thank you.

    
asked by anonymous 17.07.2017 / 15:26

1 answer

1

Just put the $, because it takes the language of the file to generate the currency symbol.

excelWorksheet.Range["S1", "S" + linhas].NumberFormat = "$ #.###,00"
    
17.07.2017 / 20:55