Hello,
We recently updated to Flexmonster version 2.9.100 (from 2.8.10) and noticed a change in the behavior of Excel exports.
Previously, when exporting to Excel and setting the format of any measure to "None" for decimals, the exported file would reflect this setting by displaying zero decimals in Excel. However, in version 2.9.100, the exported file shows 1 decimal in Excel. If we select "0" decimals in the report format options, the export works correctly, displaying no decimals in Excel.
Is this the expected behavior? It seems unusual for the export to apply a different format in Excel than the one used in the pivot table.
Additionally, what is the difference between "None" and "0" decimals? Does "None" mean that no specific formatting is applied to decimals, allowing values to retain their original decimal places as they appear in the data source?
Thank you in advance.
Hello Javier,
Thank you for contacting us.
When exporting the report to Excel, measures will contain at least one decimal place in the output file if they don't have a number format with the explicitly defined decimalPlaces
property.
To display the necessary measures as integers, set the decimalPlaces
to 0
in the number format for these measures:
report: {
formats: [
{
name: "decimalFormat",
decimalPlaces: 0
}
],
slice: {
measures: [
{
uniqueName: "Price",
aggregation: "sum",
format: "decimalFormat"
},
],
// Other slice properties
},
// Other configs
}
Alternatively, all measures can be displayed as integers in the output file if you set the decimalPlaces
to 0
in the default number format.
You are correct that the "none"
value means that there is no specific format for decimal values, while 0
removes all decimal places explicitly. However, we agree that the behavior is inconsistent in the 2.8 and 2.9 versions of Flexmonster. Our team will research possible solutions. We will provide you with the results ETA May 26th. For now, we recommend setting the decimalPlaces
to 0
explicitly.
You are welcome to contact us if other questions arise.
Kind regards,
Nadia
Hello Javier,
Thank you for giving us some time.
We researched behavior change carefully and want to share our insights and the logic behind it.
Starting from version 2.9.36, Flexmonster introduced an improvement to enhance precision when exporting numeric data to Excel. As part of this enhancement, when the format is set to "None", numeric values are now exported with their full precision. This logic guarantees that no part of the mantissa is lost during export. Therefore, integer numbers will display with a .0 in Excel unless explicit decimal formatting is applied. However, this can be easily adjusted by setting the decimalPlaces
property to 0
in the number format configuration. While .0 on an integer can be adjusted with number formatting, losing precision in a decimal value due to rounding cannot be reversed. This change prioritizes data accuracy and gives users more control over how values are displayed.
With this in mind, if you'd prefer to display integer values without any decimal places in the Excel export, we recommend explicitly setting the decimalPlaces
property to 0
in the number format. Please refer to our documentation for additional details: https://www.flexmonster.com/doc/export-report/#display-measures-as-integers.
We genuinely appreciate your attention to detail. Please don't hesitate to contact us if you have any further questions.
Kind regards,
Nadia