export to csv file

export to csv file

srimanta12srimanta12 Posts: 12Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
I am a new guy in datatable plugin. I have successfully implemented one datatable plugin in my code. Now my issue is by making use this how can I export a csv file though I use the code for that :
[code] $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "datatabledb.php",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
//"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [
{
"sExtends": "copy",
"sButtonText": "Copy to clipboard"
},
{
"sExtends": "csv",
"sButtonText": "Save to CSV"
},
{
"sExtends": "xls",
"sButtonText": "Save for Excel"
}
]
}
} );[/code]
But "Save to CSV" button is not showing. Please tell me how to fix the issue.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    What does your server error log say? I'm guessing there is a 404 error on the SWF file.

    Allan
  • srimanta12srimanta12 Posts: 12Questions: 0Answers: 0
    Thanks, I solve the issue. Actually I forget to keep the swf folder to my application structure.
  • srimanta12srimanta12 Posts: 12Questions: 0Answers: 0
    But one issue is there. I am not suppose to use the only one search field. Instead of that I am using my own custom search form. But I am unable to integrate that form with datatable plugin. Is there any option to integrate that search form also?
    Please help me.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Yes - use fnFilter to apply a filter to the table.

    Allan
  • srimanta12srimanta12 Posts: 12Questions: 0Answers: 0
    As I am new to this datatable, can you tell me, from where I will get help regarding fnFilter ?
  • srimanta12srimanta12 Posts: 12Questions: 0Answers: 0
    Thanks Allan. I customize my search form also my making use of fnFilter. But in the search form I have one age range field and one dropdown for category. Now for these two how can I make ?please help me. I think my destination is not so far.
This discussion has been closed.