Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
easywaru opened this issue May 26, 2015 · 2 comments
Closed

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

easywaru opened this issue May 26, 2015 · 2 comments

Comments

@easywaru
Copy link

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");

@guyonroche
Copy link
Collaborator

Thanks for reporting this. I will investigate

@guyonroche
Copy link
Collaborator

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 = {};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants