how to set exported file name # dom: 'lBfrtip'
how to set exported file name # dom: 'lBfrtip'
debanjanrkmbh
Posts: 3Questions: 2Answers: 0
I am trying to set the exported file name. but it is taking page title name. My code is bellow.
dom: 'lBfrtip',
buttons: [{ extend: 'csvHtml5', text: 'Export to CSV'}],
"tableTools": {
"aButtons": [{ "sExtends": "xls", "sTitle": "File Name.csv", "sFileName": "File Name.csv", "sButtonText": "Export to CSV", "oSelectorOpts": { filter: 'applied', order: 'current'} }
]
},
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
See the
csvHtml5
reference documentation (specifically thetitle
option). edit - Should betitle
as I've now corrected it.Note that TableTools should not be used at the same time as the Buttons extension. They could be, but I don't see why you would want to!
Allan
Its working now.
Thanks a ton allan!