HTML5 Excel Export Buttons Not Appearing in Safari (Official Examples Included)

HTML5 Excel Export Buttons Not Appearing in Safari (Official Examples Included)

tonydobbstonydobbs Posts: 4Questions: 1Answers: 0

I noticed that on my dataTables the Excel buttons stopped appearing, so I started doing some testing and I realized that the issue only occurs in Safari. I can't even see the Excel buttons on the example pages such as this one:
https://datatables.net/extensions/buttons/examples/html5/excelBorder.html

This works perfectly in Chrome, and Safari returns no errors in the console. Does anyone have any ideas as to what might be causing this?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Answer ✓

    Yes - current shipping Safari does not support the API's required to be able to create a file locally (therefore the button isn't shown since they cannot work). This has been fixed in WebKit and is now in the Safari tech previews, so the next version of Safari should work okay with them.

    This is noted in the excelHtml5 documentation.

    Allan

  • tonydobbstonydobbs Posts: 4Questions: 1Answers: 0

    Thank you, Allan. Are there any alternatives that you are aware of for this?

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Answer ✓

    Yes, create the XSLX file on the server-side and have the client-side download it. That is the only option at the moment.

    Allan

  • tonydobbstonydobbs Posts: 4Questions: 1Answers: 0

    Thanks, Allan. I thought this used to work with the excelFlash option, but I see that I am mistaken.

  • tonydobbstonydobbs Posts: 4Questions: 1Answers: 0

    I see that this is simply a result of flash not being enabled in Safari by default. Pardon my ignorance.

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin

    Yeah - Safari is a bit of a pain in that regard at the moment. Flash file creation isn't enabled, but they also don't support the HTML5 APIs needed to create files on the client-side (at least in the shipping version - it will soon). Its a no-win situation for Safari users atm!

    Allan

This discussion has been closed.