We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

FieldUpdateCultureSource not using number group separator

UpdateFileldsLocale1.zip (12.1 KB)

Hi,
using the attached code and docx, I’m trying to update and unlink formula fields in a document. It looks like the updating and unlinking do not take into account the number group separator specific for the culture (which for the “fr-FR” seems to be a no-break space) and instead are treating the number with group separator (1 000,49) as two separate numbers and demands an operator to be placed in the middle of it. I would expect that this would be treated as a single number in line with the selected CultureInfo’s NumberFormat.NumberGroupSeparator. In the attached template there’s a no-break space and a regular space, and neither seems to be treated as number group separator by the update and unlink methods. I have also tried using the narrow no-break space (hex 202F), both single and double as but got the same ‘missing operator’ result. Could you have a look please?

Thanks,
Tomek

@acturisaspose As I can see MS Word also does not take in account culture group and decimal separators in the formula field code. it always expects the number either in integer representation or in float representation with dot as a decimal separator.
The culture specific group and decimal separators are used when the final displayed value of the formula field is formatted.

Hi Alexey,

I was able to make MS Word accept group separated numbers in formulas on my machine - MS Word seems to be using the locale settings from Control Panel -> Region -> Change date, time or number formats -> Formats (on Win 10). After selecting ‘French (France)’ from the dropdown and applying, when I then open the document in Word and update the fields, the one with non-breaking space gets updated to the expected value.

Thanks,
Tomek

@acturisaspose Thank you for additional information. I have logged the issue as WORDSNET-24782. Our development team will investigate it deeper. We will keep you posted and let you know once it is resolved or we have more information for you.

The issues you have found earlier (filed as WORDSNET-24782) have been fixed in this Aspose.Words for .NET 23.2 update also available on NuGet.