warp header text of export value

warp header text of export value

MoluMolu Posts: 16Questions: 3Answers: 0

$(row[1]).attr('s','55');

above code is not working, can any one pls suggest.

Answers

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774

    Maybe use the selector example shown in the first comment in the excelHtml5 docs. If this doesn't help please provide an example of what you are trying. I've not tried the wrap text style so not sure if it works. Try another style to see if the problem is with the style itself or the selector you are using.

    Kevin

  • MoluMolu Posts: 16Questions: 3Answers: 0
    edited September 2022

    Hi Kevin, @kthorngren

    I have tried, other selector like 50,51 it is working fine. Wrap text is some how not working. Also I am trying to use this. https://jsfiddle.net/0n9j52jx/5/

    but excel is not opening.

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774

    I tried it in this example and it sets the cell to wrap the text:
    http://live.datatables.net/qacabeha/1/edit

    Select cell A1 the use Format > Cells > Alignment. Do you see the Wrap text option selected?

    You may need to do more like set the column width, you will see the column in the exported sheet is wider than the header text. You will also need to set the row height. Try it by manually adjusting column A then adjust the row height.

    Kevin

  • MoluMolu Posts: 16Questions: 3Answers: 0

    Yes, Kevin it is working fine, can you pls let me know for A2 cells
    ar row=$('row', sheet);
    $(row[1], sheet).attr( 's', '55' );

    Tried this, but not working.

    @kthorngren

  • MoluMolu Posts: 16Questions: 3Answers: 0

    $('row:nth-child(2) c', sheet).attr('s', '55');
    got it. But again I want to bold it also.

Sign In or Register to comment.