Buttons Export Excel Does not Work

Buttons Export Excel Does not Work

cwdgcwdg Posts: 7Questions: 2Answers: 0

I have been trying to get the button to work but and after a ton of testing I realized that the example page does not work either. I believe the code itself is bad.

https://datatables.net/extensions/buttons/examples/initialisation/simple.html

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,512 Site admin

    It appears to work well for me. What browser / OS are you using?

    Allan

  • cwdgcwdg Posts: 7Questions: 2Answers: 0

    I am using Windows 10 and have tested it in the following browsers.

    Firefox
    Chrome
    Edge
    Safari

    All browsers create the excel document but the document is blank.

  • arkofdanarkofdan Posts: 2Questions: 1Answers: 0

    Here it seems fine

    Windows 10 Firefox 44
    Windows 10 Chrome 48

  • allanallan Posts: 63,791Questions: 1Answers: 10,512 Site admin

    @cwdg - Even my example page creates an empty document? I don't really have an explanation for that I'm afraid - I'm not able to reproduce that issue.

    Allan

  • cwdgcwdg Posts: 7Questions: 2Answers: 0

    Ok after some extensive testing i found that the issue is that the xls file is not formatted the best. This causes it to fail in OpenOffice but does open correctly in Excel. I am going to research the issue and see if I can fix the issue.

  • allanallan Posts: 63,791Questions: 1Answers: 10,512 Site admin

    Ah! I didn't realise you were using OpenOffice.org. That's a known OOo bug.

    Given how little development OOo seems to be getting now I'm not sure that will ever get fixed. The file will open correctly in LibreOffice.

    Previous discussion on this topic.

    Allan

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    This should now be fixed, changes are in the nightly version ( https://datatables.net/download/nightly )

    Link to commit- https://github.com/DataTables/Buttons/commit/71fd6d01a7a9d24e0b8343603392eff3070f2cd1

This discussion has been closed.