Closed yogisaka closed 6 years ago
so you've merged cells first and then add the border?
yes im do like this:
ws.cell(15, 1, 15, 4, true).string('This test data for this content on the table').style({font: {size: 12,name: 'Arial',bold: true,},alignment: {wrapText: true,horizontal: 'center',vertical: 'center'},border: {top: {style: 'thin'},bottom: {style: 'thin'},left: {style: 'thin'},right: {style: 'thin'}}});
if im insert many string data, this border gone, and try print preview on MS excel all border gone. and im try install office 2010 and try open excel and this same result like office 2016.
Unfortunatelly, on Excel 365 on Mac the code you have sent works perfectly well.
im found this problem. if im write style
let MyStyle = wb.createStyle({ font: { size: 12, name: 'Arial', bold: true, }, alignment: { wrapText: true, horizontal: 'center', vertical: 'center' }, border: { right:{ style: 'thin' }, left:{ state: 'thin' }, bottom: { style: 'thin' }, top:{ style: 'thin' } } });
and use on cell
ws.cell(15, 1, 15, 4, true).string('This test data for this content on the table').style(MyStyle);
border is not working. but im use directly like this
ws.cell(15, 1, 15, 4, true).string('This test data for this content on the table').style({font: {size: 12,name: 'Arial',bold: true,},alignment: {wrapText: true,horizontal: 'center',vertical: 'center'},border: {top: {style: 'thin'},bottom: {style: 'thin'},left: {style: 'thin'},right: {style: 'thin'}}});
its work. i dont know what happend on my code. but thx for respose
So we can close the issue?
Yes thanks
Im try add border on my excel but not work on office 2016. im try on libre office border work. merge cell and add border
string content with style wrap text