XML number formatting in international locales

Copper Contributor

I have a program I'm running to generate an XML file. When creating this XML file, there are cells which contain numeric data. Sometimes this data will be formatted for an English locale, meaning traditional formatting is used (decimal separators are periods and thousands separators are commas). However, there are also times when these numeric values may be formatted for other locales, such as dutch locales. This means decimal separators are commas and thousand separators are periods. 

Right now, I'm saving the numeric values in XML with these separators per locale. For example, my file would show 45.66 in an English locale and 45,66 in a Dutch locale. 

 

Likewise, when I open this in Excel, I would expect my locale formatting to be respected, such that if opening in an English locale I would see 45.66 and when opening in a Dutch locale, I would see 45,66. 

However, it always appears to break when trying to view in terms of the Dutch locale -- this 45,66 instead shows as 4566 in Excel, even though the XML shows as 45,66. 

Are there settings within Excel that are needed to ensure this opens appropriately? Or does the XML version always need to be locale neutral? Or is there something else I'm missing. 

I attached files showing the XML view along with the Excel workbook view for some examples. 

2 Replies

@kbolande 

How do you open XML in Excel?

@Sergei Baklan I just right click on the file and chose to "open with" and then choose Excel.