Datatable export to excel issue with amount field 2 cell sume issue. For example A1 = 1,250.50 and A2=500. After export to excel when I select both cells together sum is appearing unexpected.
Datatable export to excel issue with amount field 2 cell sum issue
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Pankajkumar PatelRank #181 · 13.4K reputationPosted Dec 7, 2022, 4:33 AM EST
Hi Rushang Vora,
You can resolved this using "data.replace( /[$,]/g, '' )" as following:
exportOptions: { format: { body: function ( data, row, column, node ) { // Strip $ from salary column to make it numeric return column === 0 ? data.replace( /[$,]/g, '' ) : data; } } }For more details:
Hope this will help you!