exceljs / exceljs

Excel Workbook Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cell's border property do not work, when cell is merged.

easywaru opened this issue · comments

I'm sorry if i was wrong.

I just have the problem to create xlsx file with exceljs.

Ex) below is pseudo code.
case OK:// All border shows correctly.
getCell("A1").border = border_all(top right bottom left);
getCell("A2").border = border_all(top right bottom left);
getCell("A3").border = border_all(top right bottom left);

case NG: // A1's border only shows.
getCell("A1").border = border_all(top right bottom left);
getCell("A2").border = border_all(top right bottom left);
getCell("A3").border = border_all(top right bottom left);
worksheet.mergeCell("A1:A3");

Thanks for reporting this. I will investigate

Fixed in 0.2.3
Also - you can simplify your code by only setting the style in the "master" cell...

getCell("A1").border = TLBR;
worksheet.mergeCells("A1:C1");
// Cells B1 and C1 now share A1's style

// you can break a merged cell's style-link by assigning a new style object...
getCell("C1").style = {};