Default Styling not available in export to excel

Default Styling not available in export to excel

Prasanna7Prasanna7 Posts: 8Questions: 4Answers: 0

Hi,

Im using export to excel html5 as stated in basic example. But I'm not getting the header bold in excel. Please help.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765

    What version of buttons are you using? The header bold default was introduced in buttons 1.2.0.

    Kevin

  • Prasanna7Prasanna7 Posts: 8Questions: 4Answers: 0

    Im using version 1.3.1. I have downloaded from the link provided in the example. Please help.

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765

    Does this example work for you?
    https://datatables.net/extensions/buttons/examples/initialisation/simple.html

    Are you doing any customization of the export? Maybe post your Datatables config.

    The example works for me. Any information you can provide about your environment will help to find the problem.

    Kevin

  • Prasanna7Prasanna7 Posts: 8Questions: 4Answers: 0

    Hi im using the following code to add a export button.

    var buttons = new $.fn.dataTable.Buttons(employeePosTable, {
    buttons: [
    {
    extend: 'excelHtml5',
    text: 'Export To Excel',
    exportOptions: {
    columns: [':visible']
    }
    ]
    }).container().insertAfter($('#btnCreate'));

    And also the button is been positioned at starting of the div, though i specify it to insert after a button. Please help on this too.

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Answer ✓

    We'd really need a link to a page showing that issue.

    Allan

  • Prasanna7Prasanna7 Posts: 8Questions: 4Answers: 0

    The issue is with datatable.js I use. I updated it and it works fine. Thanks for your response.

This discussion has been closed.