excelFlash export in Safari on MAC

excelFlash export in Safari on MAC

lisarushlisarush Posts: 85Questions: 15Answers: 0

Using FLASH version of Excel export. This works for me in Safari on a PC (old version 5.1.7 of safari).
However, it does not work in Safari (version 9.1.3) on a MAC (OS X 10.11.6). The file that gets generated & saved is quite small & when you try to open it, you get the following error:
"We found a problem with some content in 'xxx'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes."
After clicking 'Yes' and opening, the Repairs dialog from Excel has this info:
"Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Repaired Part: /xl/worksheets/sheet1.xml part with XML error. Catastrophic failure Line 1, column 0."

(If I try to open the file with a simple editor, it looks like all binary values -- instead of a valid excel file which is mostly readable.)

I get this error message with both my table & with the following example from your website:
https://datatables.net/extensions/buttons/examples/flash/simple.html


On a (somewhat) unrelated note, does this mean that Safari will soon be able to support the 'excelHtml5' button?
https://bugs.webkit.org/show_bug.cgi?id=156056

Thank you.

This question has an accepted answers - jump to answer

Answers

  • lisarushlisarush Posts: 85Questions: 15Answers: 0
    edited November 2016

    As a fallback, I am detecting Safari & adding the 'csv' button instead.

  • allanallan Posts: 63,242Questions: 1Answers: 10,419 Site admin
    Answer ✓

    Hi,

    Thanks for letting me know about this. "Catastrophic failure" sounds terrible!

    I've just committed a fix. It looks like Safari Mac is inserting empty and useless XML namespace attributes into the majority of tags. I had a regex for that issue in IE / Edge before, so I've just expanded that to work for the Safari case as well and that allows it to create valid Excel files.

    The nightly version will be up-to-date with the change in just a few minutes and I'll be releasing this Buttons update alongside DataTables 1.10.13 at the start of December.

    On a (somewhat) unrelated note, does this mean that Safari will soon be able to support the 'excelHtml5' button?

    I believe so! I haven't tested it yet, and that feature isn't in a shipping version of Safari yet (not even the tech preview I think), but I'm going to grab a nightly build and check to see if it will work. I expect the next shipping version of Safari will allow this to work - but to be confirmed!

    Regards,
    Allan

  • lisarushlisarush Posts: 85Questions: 15Answers: 0
    edited November 2016

    Since you will be putting the fix in a release soon -- and for now, I think my fallback to 'csv' is good enough until then (they could always use a different browser for full excel support) -- I will plan to wait for the release.

    And we will cross our fingers that Safari will work for the 'excelHtml5' version soon! That would be even better.

This discussion has been closed.