Excel Export customize

Excel Export customize

buelentxbuelentx Posts: 3Questions: 2Answers: 0

Hello everbody,

I have two questions regarding customize function in excel export.

1) The example on the homepage of datatables (Excel - Cell background)
https://datatables.net/extensions/buttons/examples/html5/excelCellShading.html
doesn't work if I'm trying to export the excel file. No cell has a blue background. See attached file Datatables_request_1.PNG.

2) The customize function doesn't work if I'm exporting the excel with new added row. See the attached file Datatables_request_2. Why is there second row with "Exported data"? And why ist there first empty row although I don't define "tittle"? See https://jsfiddle.net/0k7zbggn/.

Thanks in advance for answers.

Best Regards!

Answers

  • allanallan Posts: 54,900Questions: 1Answers: 8,605 Site admin

    1) I fear I might have introduced a bug into Buttons. I'll look into that.

    2) Why is there second row with "Exported data"?

    That's coming from Buttons:

    title.replace( '*', $('title').text() || 'Exported data' )

    If title is the default, and there is no title tag or text, then Buttons will use Exported data instead.

    Not sure why there is a blank initial line though - that's odd.

    Allan

  • buelentxbuelentx Posts: 3Questions: 2Answers: 0

    Hi Allan,

    thanks for your quick response. I'm looking forward for the fixed version.

    Many thanks.

This discussion has been closed.