TableTools - Export works only first time

TableTools - Export works only first time

maqchmaqch Posts: 2Questions: 0Answers: 0

Hello

I have with my datatable with TableTools plugin and attached export buttons (csv,xls, pdf). When I click any of them then open dialog is shown, file is genereted. Works perfectly.
If I repeat the step and want to export to another format, then it seems to work but unfortunatelly not. It's genereted empty file which I cannot delete because it is being used by adobe flash player.

Does any one have similar problem?

Any sugesstions?

I'm using the latest version of datatable and the path to swf file is setup correctly

Regards
Radek

Replies

  • maqchmaqch Posts: 2Questions: 0Answers: 0

    Hello again

    It seems I found that the problem is only with IE. My configuration for table tools is as following:

    //table - is a already binded table grid with datatable plugin

    var oTableTools = new TableTools(table, {
        "sSwfPath": "media_dt/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
        "aButtons": [
            {
                "sExtends": "collection",
                "sButtonText": "<i class=\"icon-export\" aria-hidden=\"true\"></i> Export results",
                "aButtons": [
                            {
                                "sExtends": "csv",
                                "sButtonText": "Save to csv"
                            },
                            {
                                "sExtends": "xls",
                                "sButtonText": "Save to xls"
                            },
                            {
                                "sExtends": "pdf",
                                "sButtonText": "Save to pdf"
                            }
                ]
            }
        ]
    });
    

    So it doesn't work in IE

    You can check the example available at:

    http://datatables.net/release-datatables/extensions/TableTools/examples/collection.html

    After clicking Save, 3 option apears. You will be able e.g. to export to pdf. If you try next time e.g to export to csv, then this operation failed.

    Important thing is that the open dialog is build without an extension for the file.

    Regards
    Radek

  • jcollsjcolls Posts: 3Questions: 1Answers: 0

    Did you find a solution to this. I'm experiencing the same issue.

  • plemm98plemm98 Posts: 1Questions: 0Answers: 0
    edited June 2015

    I'm having a similar behavior in a vanilla mvc web site. Did you ever find a solution for this problem?

    I try to reproduce your problem at this link : http://datatables.net/release-datatables/extensions/TableTools/examples/collection.html

    But, in my case, it work all the time.

    But, you can reproduce this error using this mvc project :

    https://onedrive.live.com/redir?resid=348AB143041451F2!10833&authkey=!AGlf-75YOAhTqr0&ithint=file%2czip

  • jcollsjcolls Posts: 3Questions: 1Answers: 0

    Nope, after many deadends I just put it down to a bug between Flash plugin and IE. I'm hoping that a Flash-less solution will become available perhaps with the new Buttons release.

This discussion has been closed.