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

Free Support Forum - aspose.com

Formatter value with LINQ

I was trying to format numeric values with linq. << [value]: ”#, ## 0.00” >>. But I would like to format it with a specific “Culture”, such as ("##, #", es-ES). How can I do this?


To format your numeric value with a specific culture info, please use the com.aspose.words.CurrentThreadSettings.setLocale method as shown below:

Document doc = new Document("C:\\Temp\\input.docx");


double value = 12345678.654321;

ReportingEngine engine = new ReportingEngine();
engine.buildReport(doc, value, "value");


Please note that the current thread’s locale can be set back after the report is built, if needed.


Thank you, so much