BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
You can apply border for a cell or range of cells through following ways,
1) Use format
method to apply border via code
This is in Core and the issue I'm having is when I follow the example way to style using "format" the styling doesn't display. I'm just trying to put a border around a range of cells. On my cshtml page lines such as this work for applying other styling: xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:AA2");. However, if I try borders it doesn't apply so I'm guessing I'm misunderstanding what is meant on that formatting documentation page when it says "Use format method to apply border via code".
In code format this was my interpretation of that sentence based on there being no example of applying borders on that page for whatever reason:
xlFormat.format({ "style": { "border": "2px solid black" } }, "A1:AA2");
//Color should be defined as hex code value.
//Thick box border
xlFormat.format({ "style": { "border": { top: "2px solid #000000", left: "2px solid #000000", bottom: "2px solid #000000", right: "2px solid #000000" } } }, "A1:AA2");
//All border
xlFormat.format({ "style": { "border": { top: "1px solid #000000", left: "1px solid #000000", bottom: "1px solid #000000", right: "1px solid #000000", isGridBorder: true } } }, "A1:AA2");
|
//Thick box border
this.setBorder({ type: "thickbox", color: "#000000", style: "solid" }, "A1:AA2");
//All border
this.setBorder({ type: "allborder", color: "#000000", style: "solid" }, "A1:AA2");
|