Error opening Excel file produced by the Buttons extension Excel button

Error opening Excel file produced by the Buttons extension Excel button

cahrenscahrens Posts: 3Questions: 0Answers: 0

I am using the current version of the Buttons extension. When I produce an Excel document from the Excel button plugin, I got the following error from Excel when opening the document:

"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."

This error only occurs when I suppress the title in the Excel output (and do not have a footer).

{
extend: 'excel',
title: null,
}

If I do add a footer, the problem goes away. It seems that the issue is with the mergeCells tag being present when no cells are being merged. In fact, if I delete this line, then the issue is resolved.

https://github.com/DataTables/Buttons/blob/54546ecb6b209cb0a678cb33c198b725e1d192d1/js/buttons.html5.js#L561

I wanted to report this bug and see if there is any way to work around it without editing source code.

Thank you!
Christina

Replies

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Hi Christina,

    Thanks for bringing that to my attention. Fixed here. The nightly version will shortly be up to date with that change.

    Regards,
    Allan

  • cahrenscahrens Posts: 3Questions: 0Answers: 0

    @allen Thank you for the very prompt fix! I didn't receive an email notification, and therefore hadn't noticed your response.

    Do you have a plan for when another version of DataTables will be released?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    It will be the Buttons library that will need to be released rather than DataTables for this fix. It will probably be some time next month for the release. Until then the nightly files will contain this fix.

    Allan

  • cahrenscahrens Posts: 3Questions: 0Answers: 0

    Thanks!

This discussion has been closed.