How to insert a text box in csv using javascript?
How to insert a text box in csv using javascript?
Debugger code (debug.datatables.net):
buttons: [ { extend: 'csv', className: 'btn-sm me-1',
exportOptions:{
columns:exportColumns
},
customize: function (csv) {
if(accounts_flag==0)
{
return csv+"\n\n"+footer;//this footer I want in a text box
}
else
{
return csv;
}
}
}],
Error messages shown:
I want this---
But I am getting this
Description of problem:
I want to add a footer in csv but in a text box, though I am adding through customize button but it's adding it in cells. Please suggest some way for it
Answers
A CSV file is just a plain text file. Looks like you want to export to an Excel file. Excel files use OpenXML file format. See the
excelHtml5
docs for details. Liekly you will need to create a custom style for the text box.Kevin