question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataExporter: Permit using custom DecimalFormat in ExcelOptions

See original GitHub issue

Description

It would be nice to allow a custom DecimalFormat to be used only in Excel files and not directly related to the locale used in JSF.

Describe the solution you would like

Add a new property in ExcelOptions called decimalFormat of type java.text.DecimalFormat which should be used when exporting to Excel files (xls, xlsx, xlsxstream)

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wbss1commented, Aug 25, 2022

Hi @jasonex7. Setting

<locale-config>
    <default-locale>it_IT</default-locale>
</locale-config>

fix my problem.

Thank you for your answer.

0reactions
jasonex7commented, Aug 25, 2022

Hi @wbss1. Setting a custom currency symbol per cell basis is not supported and is out of scope of this issue. Currently, DataExporter currency detection feature only considers the property “CurrencyFormat” in ExcelOptions or, if it’s not defined, <locale-config> in faces-config.xml.

I think that you’re setting “currencySymbol” property property because you’re using “it” locale without the country part and “it” locale doesn’t establish a specific currency symbol. I recommend to use a locale with country part, e.g. “it_IT”, “it_US” or similar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specify Custom Number Decimal and Group Separators for ...
In Microsoft Excel, you can specify the Custom Decimal and Thousands Separators instead of using System Separators from the Advanced Excel Options as...
Read more >
primefaces - NPM Package Overview - Socket.dev
Start using Socket to analyze primefaces and its 27 dependencies to ... DataExporter: Permit using custom DecimalFormat in ExcelOptions by ...
Read more >
Customizing Formats (The Java™ Tutorials ...
This class allows you to control the display of leading and trailing zeros, prefixes and suffixes, grouping (thousands) separators, and the decimal separator....
Read more >
primefaces/primefaces 12.0.0-RC1 on GitHub - NewReleases.io
... Fixes #8961 - DataExporter: Permit using custom DecimalFormat in ExcelOptions by @jasonex7 in #8964; Fixes #8970 - DataExporter: Align numeric cells at ......
Read more >
How to Add Decimal Places in Excel (Automatically)
While Excel does not allow this by default (as it doesn't allow only zeros after the decimal number), you can easily change this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found