Export custom file name
Export custom file name
dthemes
Posts: 11Questions: 6Answers: 0
Hi,
I'm trying to set a default file name for exporting. I read some forum messages and docs on this website but whatever I try I always end-up with the HTML title as file name.
Please see below my code:
$.getJSON("http://127.0.0.1:9999/getdata", function( raw ) {
$(document).ready(function() {
$('#data').html( '<table cellpadding="0" cellspacing="0" border="0" class="display compact" id="foo-data"></table>' );
$('#foo-data').dataTable( {
dom: '<"tblContainerT"T><"tblContainerTop"lf><rt><"bottom"ip>',
sSwfPath: "/swf/copy_csv_xls_pdf.swf",
buttons: [
{
extend: 'excelFlash',
title: 'Data export'
}
],
data: raw['tbody'],
columns: raw['thead']
});
});
});
This discussion has been closed.