Datatable Excel Export How Can We Apply Multiple Styles To Same Cell

Datatable Excel Export How Can We Apply Multiple Styles To Same Cell

AshwarthiniAshwarthini Posts: 3Questions: 1Answers: 0

i need my excel in this format could someone please held to do that

HERE IS MY CODE
jsfiddle.net/xh6k2fpj/1/

Answers

  • mr.shahinmr.shahin Posts: 10Questions: 2Answers: 1

    HI,
    can you try this:

    $('row c ', sheet).each(function () {
                $(this).attr( 's', '25' ); // Add this line to your code to add borders
                    var attr = $(this).attr('r');
                    var pre = attr.substring(0, 1);
                    var ind = parseInt(attr.substring(1, attr.length));
                    ind = ind + downrows;
                    $(this).attr("r", pre + ind);
                });
    

    refer to this link for the available styling options.
    Regards

  • AshwarthiniAshwarthini Posts: 3Questions: 1Answers: 0

    thank you @mr.shahin sir but adding Normal text, thin black border(25) removes Centred text (51)

  • mr.shahinmr.shahin Posts: 10Questions: 2Answers: 1
    edited February 2020

    In this case I would refer you to this library
    as it allows you to freely style your excel sheet

This discussion has been closed.