Hi,
I struggling while exporting to excel as I got numbers formatted with decimal point always.
If the employee number is 123 once exported to excel I get 123.0
I have made all your format options but I couldn't get number format in excel, I got "Custom" format and get decimal point with one zero.
Please let me know how to solve this.
Best Regards,
Waleed
Hello Waleed,
Thank you for reaching out to us.
We recommend setting the decimal places explicitly to "0"
to show the values without decimal places when exporting to Excel:
formats: [{
"name": "decimalFormat",
"decimalPlaces": 0
}],
You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/p5xmkbr3/
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Dear Nadia,
Thank you for your reply, I already tried that solution but it's not working with me.
Here's my code:
columns: [
{
uniqueName: "EMP_NO",
caption: "Emp No",
sort: "asc"
},
{
uniqueName: "EMP_NAME",
caption: "Employee Name"
},
{
uniqueName: "DOC_NO",
caption: "ID NO",
sort: "asc"
}
],
"formats": [{
"name": "",
"decimalPlaces": 0
}],
I don't have measures
Hello Waleed,
Thank you for the response and for providing us with the details.
We could not reproduce the described behavior on our side. Please check the following example: https://jsfiddle.net/flexmonster/vpdk7r81/. In this JSFiddle, both numbers are displayed without the decimal places when exported to Excel.
Could you please edit the example above to show us the issue? It would greatly help us.
Kind regards,
Nadia
Hello,
Hope you are doing well.
We were wondering if you still face the issue. Is there still anything we can help you with?
Looking forward to hearing from you.
Kind regards,
Nadia
Yes issue is still there, I tried to copy the code in your example but it's same once I export to excel.
Best Regards,
Waleed
Hello Waleed,
Thank you for the response.
We recommend updating Flexmonster to the latest version. Here is our guide on upgrading the component to the latest version: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia