I'm using Aspose cells for Java 18.104.22.168.
When i'm saving the workbook with PDF format, it seems that Decimal/Thousands separators are connected to local variables :
- On UNIX platform, local variables (LC_NUMERIC, LC_MONETARY, ...) are en_US.ISO8859-15 and decimal separator is ".", thousands separator is ","
- On WINDOWS platform, language is french and decimal separator is ",", thousand separator is space.
Is there a way to manage Decimal/Thousand separators directly in my code, depending of le "language" selected in the application by final user ?
Developpment Software Engineer
Thank you for contacting Aspose support.
This is the default behavior of Excel applications to format the data (Date, Numbers, Currency) according to the system’s locale. Aspose.Cells follows Excel’s guidelines & recommendations to it behaves similarly.
Please try setting the locale of the Workbook instance using the WorkbookSettings.setLocale method to desired location and then render it to PDF format as demonstrated below.
Workbook book = new Workbook(path);
thx for your help which makes me find the way to solve my issue.
We have to set the language to change separators.
But is ther a way to mix separators (decimal / thousands) ?
It is good to know that you are up and running again. Regarding your recent inquiry, I am afraid, it will not be possible to format the data according to two different locales. As discussed earlier, MS Excel automatically changes/assigns the formatting to the data according to the system location. It is not possible even in MS Excel to format data differently. However, if you can achieve your requirement with MS Excel, we will surely look into the matter to propose a solution with Aspose.Cells APIs. In that case, please provide us the input & output spreadsheets along with the sequence to achieve your requirement with MS Excel application.
in EXCEL Application, when you set "Excel Options/Advanced Options/Display Options" whith you own separators (decimal=".", thousands=space, see ExcelSeparatorsOptions.docx joined), you can provide pdf result like Template_SAVEAS_EXCEL2.pdf (joind) with "save as PDF".
It will be great to do the same thing with Aspose.
Thank you for providing more details.
By reviewing your provided document, we believe that you wish to set the custom separators for the complete workbook while disabling any systems settings for locale based number & currency separators.
We have logged your requirements in our database under the ticket CELLSJAVA-41127 for feasibility analysis. Please spare us little time to properly analyze the requirement, and to provide the implementation with future revisions of Aspose.Cells APIs. In the meanwhile, we will keep you posted with updates in this regard.
Thanks for using Aspose.Cells for Java.
Please download and try this fix: Aspose.Cells for Java v22.214.171.124 and let us know your feedback.
Please use WorkbookSettings.NumberDecimalSeparator, NumberGroupSeparator properties to set the custom separators for formatting/parsing numbers.
The issues you have found earlier (filed as CELLSJAVA-41127) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
hi @babar.raza ,
I am also facing similar issue.
Here I have decimal values and I am exporting PDF of data using document template in which I have placeholders similar to “<<[ Amount]:”0.00”>>” and it is showing data when there is no decimal points value.
When I have a decimal number which has more than 3 digits and decimal points values
then it is showing 1010.00 where as it should display 1010.25
can you please help me with this problem?
Would you like to provide your sample file and executable Console project? We will check it soon.