I was stuck in doing Export 2 Excel ,the code which was given in data tables is not working?

I was stuck in doing Export 2 Excel ,the code which was given in data tables is not working?

Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0










$(document).ready(function() { $('#FlagsExport').DataTable({ "pageLength": 50, dom: 'Bfrtip', buttons: ['copy','csv','excel','pdf','print'] }); });

This question has an accepted answers - jump to answer

«1

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    You need to tell us more of the nature of the problem. Do the buttons show up, do they show up and don't work, etc.

    Verify you have all of the button includes, both css and js.

    be sure to check the download page

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    i have completed the 50% task export 2 excel ,now a problem is coming that after clicking on the excel button ,excel file is generating but data was not vissible.
    and the file which was downloaded it has 32kb size means data is there but is is not vissible?

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    i missed any Extension or what?

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Please show your code, or preferably provide a link to test page showing the issue.

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    check this @tangerine

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    on clicking on Excel button data is not coming but on clicking on pdf button data is coming properly....?

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Your "export to excelllllllllll" button is working fine for me.

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Button is working but after generating Excel data is not coming on clicking Excel button.

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    open the Excel then you will get the problem.

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954

    I responded in your other posting. Please don't duplicate posts.

    I tried your page and both Excel and PDF export data. Is the problem that you are only seeing five rows in the Excel file?

    If so then you need to remove this:

                 modifier: {
                        page: 'current'
                    }
    

    If the problem is different please provide specific details of the issue like web browser, what you are or are not seeing.

    Kevin

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    My problem was that after downloading the excel ,data is not visible nothing to see.

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Not a single data is coming in export excel but in PDF data is coming properly but I need export excel.

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954

    At least two people were able to export data into Excel using your attached trail.html. Are you able to successfully use the Excel export option from this example?
    https://datatables.net/extensions/buttons/examples/html5/simple.html

    I did notice that you are using an old version of buttons (1.1.2). You may want to upgrade which may resolve your issue. I think the latest version is 1.3.1.

    If upgrading doesn't help then please provide more information about your environment, like web browser, device type, etc.

    Kevin

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Total data is not coming only the data visible on the current screen is coming ,i want 2 export the whole data.check the html page which i am sending .

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Done..thank you so much..

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    Do you mean that it is fixed now? What was the change that made the difference?

    Allan

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    The JS given in the Data table Export 2 Excel is old version ,i used Button related JS 1.3.1 after that data came.
    I want 2 know that can we used these things for IE ((9,8,7...),
    it is only applicable for IE(10+).

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    SCRIPT: Object doesn't support property or method 'createPdf'.
    Error is coming when i am going 2 export pdf.

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Answer ✓

    I want 2 know that can we used these things for IE ((9,8,7...),

    You have to use the Flash version of the buttons for legacy browsers. They simply don't have the features required to create the PDF file client-side without a plug-in.

    Allan

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    I am getting a problem if i am going 2 implement Export excel in Pop pup a error is coming .why this thing is happening i dont know .

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    TableTools was retired a long time ago. Don't use it.
    https://datatables.net/extensions/tabletools/

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    U mean I have 2 apply this code in data table functionality.but previousy we used
    "dom":'Bfrtip' and this code "dom": 'T<"clear">lfrtip',?

    $(document).ready( function () {
    $('#example').dataTable( {
    "dom": 'T<"clear">lfrtip',
    "tableTools": {
    "sSwfPath": "/swf/copy_csv_xls_pdf.swf"
    }
    } );
    } );

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    No - use only Buttons. It has both Flash and HTML5 button types and if you include both types of buttons it will automatically select which type to use based on the capabilities of the browser.

    Allan

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Export excel will not work properly for 2000 data?
    Export excel is not responding because of longscript this type of message is coming.

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Not able 2 export excel for 10333 entites ?
    Message came local host is not responding because of longscript.

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    I Found one thing that till 7000 data will be exported Properly but if Data is more than 8000-13000 data then Export Excel is not working while PDF is working Fine in any number of Data ,This was an issue regarding Export Excel using Data table ,if possible then try 2 find out solu.

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    Happy to take a look at a test case showing the issue so it can be debugged.

    Allan

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    I want 2 show loader image while loading 10000 data to excel:but it was not working

    $('#myTable').DataTable({
    language: {
    processing: "<img src='img/loading.gif'> Loading...",
    }
    processing : true,
    });

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    The processing language option isn't used by the Excel button. There shouldn't be anything in the documentation suggesting that it would be, and if there is, could you point it out so I can remove it please.

    The Excel button itself should show a processing indicator, but if the CPU is being pegged at 100% for the export, I'm sure how useful the processing indicator will be.

    Allan

  • Neeraj24Neeraj24 Posts: 35Questions: 4Answers: 0

    Is there is any way 2 show loadder while exporting data and when the file will be loaded ,it should be disappear.

This discussion has been closed.