Lines 670-675
function _dt_buttons(params){
Link Here
|
670 |
exportColumns = settings["exportColumns"]; |
670 |
exportColumns = settings["exportColumns"]; |
671 |
} |
671 |
} |
672 |
|
672 |
|
|
|
673 |
const export_format_spreadsheet = { |
674 |
body: function ( data, row, column, node ) { |
675 |
var newnode = $(node); |
676 |
|
677 |
if ( newnode.find(".noExport").length > 0 ) { |
678 |
newnode = newnode.clone(); |
679 |
newnode.find(".noExport").remove(); |
680 |
} |
681 |
let trimmed_str = newnode.text().replace( /\n/g, ' ' ).trim(); |
682 |
const unsafeCharacters = /^[=+\-@\t\r]/; |
683 |
if ( unsafeCharacters.test(trimmed_str) ){ |
684 |
trimmed_str = "'" + trimmed_str; |
685 |
} |
686 |
return trimmed_str; |
687 |
} |
688 |
} |
689 |
|
673 |
var export_format = { |
690 |
var export_format = { |
674 |
body: function ( data, row, column, node ) { |
691 |
body: function ( data, row, column, node ) { |
675 |
var newnode = $(node); |
692 |
var newnode = $(node); |
Lines 688-701
function _dt_buttons(params){
Link Here
|
688 |
extend: 'excelHtml5', |
705 |
extend: 'excelHtml5', |
689 |
exportOptions: { |
706 |
exportOptions: { |
690 |
columns: exportColumns, |
707 |
columns: exportColumns, |
691 |
format: export_format |
708 |
format: export_format_spreadsheet |
692 |
}, |
709 |
}, |
693 |
}, |
710 |
}, |
694 |
{ |
711 |
{ |
695 |
extend: 'csvHtml5', |
712 |
extend: 'csvHtml5', |
696 |
exportOptions: { |
713 |
exportOptions: { |
697 |
columns: exportColumns, |
714 |
columns: exportColumns, |
698 |
format: export_format |
715 |
format: export_format_spreadsheet |
699 |
}, |
716 |
}, |
700 |
}, |
717 |
}, |
701 |
{ |
718 |
{ |
702 |
- |
|
|