CHANGE_CSV : RV

This commit is contained in:
VENKATESHWARAN 2025-09-09 09:53:44 +05:30
parent 201ad57974
commit 84c45897bd

View File

@ -232,14 +232,22 @@ $(document).ready(function() {
extend: 'csv', extend: 'csv',
text: 'CSV', text: 'CSV',
title: 'Policy-Tranction-BDS-List', title: 'Policy-Tranction-BDS-List',
customizeData: function (data) { exportOptions: {
for (var i = 0; i < data.body.length; i++) { columns: ':visible', // or specify exact columns [0,1,2,...]
for (var j = 0; j < data.body[i].length; j++) { format: {
// force text format by prefixing a tab body: function (data, row, column, node) {
data.body[i][j] = '\t' + data.body[i][j]; // 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', extend: 'excel',