Force Currency to remain in $ even when opened with different region setting


#1

I have a client that is in the UK. When the open up the excel document that Aspose generates, MS excel automatically changes all the $ to the (pound sign). This obviously provides incorrect values. My question is: How do I make aspose tell Excel to always use the $ sign, regardless of the region they are using?


#2

I found the solution to this. I thought I would post it for the benefit of others.

I was using the cells.Style.Number = 7. This will respect the current user's regional setting.

However, using cells.Style.Custom = "$#,##0.00;$-#,##0.00";

This forces it to be in dollars.


#3

You are correct. If you use number to set number format, number format depends on regional setting. Custom format string doesn’t.