TableTools copies but doesn't export to CSV / XLS / PDF
TableTools copies but doesn't export to CSV / XLS / PDF
drewt
Posts: 22Questions: 0Answers: 0
Hi Alan et al.,
I have a semi-working TableTools implementation that copies and goes to print view but does not save.
I get the 'Save' dropdown menu fine but all the are greyed out which has me thinking it may be a problem with CSS?
Site is using bootstrap 2.0.3, datatables 1.9.4, tabletools 2.1.4
Here's a debug code from the Firefox bookmarklet: http://debug.datatables.net/eyaqog
Here's my initialiazation from php:
[code]
$(document).ready( function() {
$('#phototable').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"sSwfPath": "<?php echo PATH_JS; ?>datatables/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
});
});
[/code]
I know the SWF path is working because copying the table works fine. What am I missing?
I have a semi-working TableTools implementation that copies and goes to print view but does not save.
I get the 'Save' dropdown menu fine but all the are greyed out which has me thinking it may be a problem with CSS?
Site is using bootstrap 2.0.3, datatables 1.9.4, tabletools 2.1.4
Here's a debug code from the Firefox bookmarklet: http://debug.datatables.net/eyaqog
Here's my initialiazation from php:
[code]
$(document).ready( function() {
$('#phototable').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"sSwfPath": "<?php echo PATH_JS; ?>datatables/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
});
});
[/code]
I know the SWF path is working because copying the table works fine. What am I missing?
This discussion has been closed.
Replies
By the way, thanks y'all!
Did you set the SWF path? Do you see the buttons?
Please link to a test case.
Allan
Thanks so much for what you do. I can't believe how helpful you are to everyone.
Here's a test case on js fiddle:
http://jsfiddle.net/7mBf5/
Allan