title: How to add cell border to SheetJS .xlsx generated file?
body: <p>I have a <a href="https://github.com/sheetjs/js-xlsx" rel="noreferrer">SheetJS</a> .xlsx generated file, but I have not been able to put <code>border</code> to the <code>cells</code>.</p>
  
  <p>I have this:</p>
  
  <p><a href="https://i.stack.imgur.com/9ydBI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9ydBI.png" alt="enter image description here"></a></p>
  
  <p>And I need this:</p>
  
  <p><a href="https://i.stack.imgur.com/MsWLo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MsWLo.png" alt="enter image description here"></a></p>
  
  <p>Is there a way to do it with <code>SheetJS</code>? It will be cool if there's a way to apply another cell styles, like background color.</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I'm making the sheets with this function:</p>
  
  <pre><code>function makeSheet(wb, day){        //sheet for a specific day
      var ws = XLSX.utils.table_to_sheet(document.getElementById("table"+day));
      wb.SheetNames.push(day);
      wb.Sheets[day] = ws;
      //columns width working ok
      wb["Sheets"][day]["!cols"] = [{ wpx : 70 },{ wpx : 121 }];
      //wb["Sheets"][day]["A1"]["s"] = {"border":"1px"};  //I've tried this but doesn't work
    return wb;
  }
  </code></pre>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I've created this example snippet, if you can put borders and/or another cell style here, that's going to be a victory:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(myMain);
  function myMain(){
    $(document).on("click","#btnexcel", function(){makeExcel()});
  }
  function s2ab(s) {
    var buf = new ArrayBuffer(s.length);
    var view = new Uint8Array(buf);
    for (var i=0; i&lt;s.length; i++) view[i] = s.charCodeAt(i) &amp; 0xFF;
    return buf;
  }
  function makeExcel(){
   var wb = XLSX.utils.table_to_book(document.getElementById("myTable"),{sheet:"Sheet 1"}) //my html table
  
   var wbout = XLSX.write(wb, {bookType:'xlsx',  bookSST:true, type: 'binary'});
   saveAs(new Blob([s2ab(wbout)],{type:"application/octet-stream"}), 'MyExcel.xlsx');
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- JQuery  --&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;!-- Bootstrap CSS--&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
  &lt;!-- Bootstrap JavaScript --&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;script lang="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.12.13/xlsx.full.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://fastcdn.org/FileSaver.js/1.1.20151003/FileSaver.min.js"&gt;&lt;/script&gt;
  
  &lt;button id="btnexcel"&gt;Download excel&lt;/button&gt;
  &lt;table id="myTable" border="1"&gt;
    &lt;thead&gt;&lt;tr&gt;&lt;th&gt;hello&lt;/th&gt;&lt;th&gt;dear community&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;&lt;td&gt;I need borders&lt;/td&gt;&lt;td&gt;around here&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;I'll be glad&lt;/td&gt;&lt;td&gt;if you help me&lt;/td&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>