I have a SheetJS .xlsx generated file, but I have not been able to put border
to the cells
.
I have this:
And I need this:
Is there a way to do it with SheetJS
? It will be cool if there's a way to apply another cell styles, like background color.
EDIT:
I'm making the sheets with this function:
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;
}
EDIT 2
I've created this example snippet, if you can put borders and/or another cell style here, that's going to be a victory:
You are using community version of SheetJS
library and with this version can not do styling. BUT in Pro Version styling feature is available.
Checkout this official comment:
This is the community version. We also offer a pro version with performance enhancements, additional features like styling, and dedicated support.
For more information about Pro Version visit their official site: http://sheetjs.com/pro