Set "background-color" not working in "html-to-xlsx" but working in "chrome-pdf"



  • I'm having trouble getting the background color to display in excel.

    As mentioned in title, the chrome-pdf works but the html-to-xlsx doesn't.

    Here is the playground: https://playground.jsreport.net/w/anon/QK7qB5AE

    On a side note, not sure why in the above sample playground the excel generation takes quite a reasonable time to generate the excel but in my local jsreport, it is taking me at least 10s to generate the above same excel.

    Thanks for the help in advanced!



  • It seems you need to apply the style to the td.

     .header-center > td {
       background-color: red
    }
    


  • Hi, thanks for the solution.
    It did help to set the background color for the .header-center class.
    But for the ".header-top", I tried to do the same but strangely, it did not work for the color black / #000000.
    It did work for other colors though...
    Any idea why is this happening?


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.