Bug in title vs. filename in excelHtml5 button?

Bug in title vs. filename in excelHtml5 button?

CarstenCarsten Posts: 5Questions: 3Answers: 0

Hello,

when I initialize a button like this:

var Tabelle = $('#HauptTabelle').DataTable(
    {
        buttons: [
            {
                extend: 'excelHtml5',
            },
        ],
    }
);

with version 1.4.2, the title of the HTML document is used both as the filename of the downloaded file and as the first line in the generated xlsx file.

However, this breaks backwards-compatibility with pre-1.4.0 versions. What I would like to have is:

var Tabelle = $('#HauptTabelle').DataTable(
    {
        buttons: [
            {
                extend: 'excelHtml5',
                filename: '*',
                title: null,
            },
        ],
    }
);

The problem is, that with or without the line filename: '*',, the filename of the downloaded document is "download" rather than the HTML document's title.

A bug?

Answers

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    Hi,

    Sorry for the delay in replying here. Yes, a bug there. Resolved here and now in the nightly. It will be in the next release of Buttons.

    Regards,
    Allan

  • CarstenCarsten Posts: 5Questions: 3Answers: 0

    Thank you! :)

This discussion has been closed.