CHANGE_CSV : RV
This commit is contained in:
parent
201ad57974
commit
84c45897bd
@ -232,14 +232,22 @@ $(document).ready(function() {
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
customizeData: function (data) {
|
||||
for (var i = 0; i < data.body.length; i++) {
|
||||
for (var j = 0; j < data.body[i].length; j++) {
|
||||
// force text format by prefixing a tab
|
||||
data.body[i][j] = '\t' + data.body[i][j];
|
||||
exportOptions: {
|
||||
columns: ':visible', // or specify exact columns [0,1,2,...]
|
||||
format: {
|
||||
body: function (data, row, column, node) {
|
||||
// Force K and L columns to string
|
||||
if (column === 10 || column === 11) {
|
||||
// Option 1: prepend single quote
|
||||
return '\u200C' + data;
|
||||
|
||||
// Option 2: use Excel formula trick
|
||||
// return '="' + data + '"';
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user