Search code examples
headeralasqluibackgroundcolor

how can i do to give background color to the headers using alasql?


what is the right key word to give the header a bgcolor ?
window.exportExcel = function exportExcel(listPersone) { var fileName=prompt(); var opts = { headers:true, style:'background:#00FF00', //doesn't work column: {style:{Font:{Bold:"1"}}}, rows: {1:{style:{Font:{Color:"#FF0077"}}}}, cells: {1:{1:{ style: {Font:{Color:"#00FFFF"}} }}} }; alasql('SELECT * INTO XLSXML("'+fileName+'.xls",?) FROM ?',[opts,listPersone ]); }

example


Solution

  • this is the solution to give the header a background color !

    var opts = {
                  headers:true, 
                  column: {
                      style:{
                          Font:{
                              Bold:"1",
                              Color:"#3C3741",
                          },
                          Alignment:{
                              Horizontal:"Center"
                          },
                          Interior:{
                              Color:"#7CEECE",
                              Pattern:"Solid"
                          }
                      },
                  },