Buttons Export Excel Does not Work
Buttons Export Excel Does not Work
cwdg
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
This discussion has been closed.
Answers
It appears to work well for me. What browser / OS are you using?
Allan
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.
Here it seems fine
Windows 10 Firefox 44
Windows 10 Chrome 48
@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
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.
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
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