We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
The regex ( data.replace(/[$,]/g, '' ) you are using is not correct to replace . You will want something like data.replace(/ /gi,' ') instead.
Replies
When I export data table to excel ,the blank values in datatable comes in excel as   so I Actually I dont want these ..
Please help me........
Thanks
Hari
One option might be to use Orthogonal data and convert the
 
string to a space. See this example of using Orthogonal data with the export buttons.Kevin
this is my code but still tags are coming in excel
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
this is my code
exportOptions: {
orthogonal: 'export',
format: {
body: function (data, row, column, node, type) {
return type === 'export' ? data.replace(/[$,]/g, '') : data;
},
modifier: {
// DataTables core
order: 'index', // 'current', 'applied', 'index', 'original'
page: 'all', // 'all', 'current'
search: 'none' // 'none', 'applied', 'removed'
},
columns: ':visible'
},
To progress this, please post a test case as requested, that will allow us to debug the code,
Colin
The regex (
data.replace(/[$,]/g, ''
) you are using is not correct to replace
. You will want something likedata.replace(/ /gi,' ')
instead.Kevin