How to insert a text box in csv using javascript?

How to insert a text box in csv using javascript?

therahuls22therahuls22 Posts: 1Questions: 1Answers: 0
edited January 2023 in Free community support

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

  • kthorngrenkthorngren Posts: 21,283Questions: 26Answers: 4,940

    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

Sign In or Register to comment.