Spread.Sheets Documentation
setBorder Method
GC.Spread.Sheets Namespace > CellRange type : setBorder Method
The border line.

For example, {all:true}, {left:true, right:true}. The following settings are available:

option.all boolean type Specifies all directions for the border.
option.left boolean type Specifies the left border.
option.top boolean type Specifies the top border.
option.right boolean type Specifies the right border.
option.bottom boolean type Specifies the bottom border.
option.outline boolean type Specifies the left, top, right, and bottom borders.
option.inside boolean type Specifies the inner horizontal and vertical borders.
option.innerHorizontal boolean type Specifies the horizontal border.
option.innerVertical boolean type Specifies the vertical border.
Sets the border for the specified area.
Syntax
var instance = new GC.Spread.Sheets.CellRange(sheet, row, col, rowCount, colCount, sheetArea);
var value; // Type: any
value = instance.setBorder(border, option);
function setBorder( 
   border : LineBorder,
   option : Object
) : any;

Parameters

border
The border line.
option

For example, {all:true}, {left:true, right:true}. The following settings are available:

option.all boolean type Specifies all directions for the border.
option.left boolean type Specifies the left border.
option.top boolean type Specifies the top border.
option.right boolean type Specifies the right border.
option.bottom boolean type Specifies the bottom border.
option.outline boolean type Specifies the left, top, right, and bottom borders.
option.inside boolean type Specifies the inner horizontal and vertical borders.
option.innerHorizontal boolean type Specifies the horizontal border.
option.innerVertical boolean type Specifies the vertical border.
Example
This example creates borders.
sheet.getCell(1, 1).borderTop(new GC.Spread.Sheets.LineBorder("#F0F8FF",GC.Spread.Sheets.LineStyle.double));
sheet.getCell(1, 1).borderLeft(new GC.Spread.Sheets.LineBorder("#F0F8FF",GC.Spread.Sheets.LineStyle.hair));
sheet.getCell(1, 1).borderRight(new GC.Spread.Sheets.LineBorder("#FAEBD7",GC.Spread.Sheets.LineStyle.dashDot));
sheet.getCell(1, 1).borderBottom(new GC.Spread.Sheets.LineBorder("#00FFFF",GC.Spread.Sheets.LineStyle.medium));
sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderTop(new GC.Spread.Sheets.LineBorder("#F0FFFF",GC.Spread.Sheets.LineStyle.medium));
sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderLeft(new GC.Spread.Sheets.LineBorder("#F5F5DC",GC.Spread.Sheets.LineStyle.medium));
sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderRight(new GC.Spread.Sheets.LineBorder("#FF02FF", GC.Spread.Sheets.LineStyle.dashDot));
sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderBottom (new GC.Spread.Sheets.LineBorder("#FFE4C4",GC.Spread.Sheets.LineStyle.thin));
sheet.getRange(2, 2, 2, 2, GC.Spread.Sheets.SheetArea.viewport).setBorder(new GC.Spread.Sheets.LineBorder("#8A2BE2",GC.Spread.Sheets.LineStyle.thick), { all:true },3);
sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderTop( new GC.Spread.Sheets.LineBorder("#A52A2A",GC.Spread.Sheets.LineStyle.mediumDashed));
sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderLeft( new GC.Spread.Sheets.LineBorder("#FF02FF",GC.Spread.Sheets.LineStyle.medium));
sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderRight(new GC.Spread.Sheets.LineBorder("#5F9EA0", GC.Spread.Sheets.LineStyle.dashDot));
sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderBottom (new GC.Spread.Sheets.LineBorder("#6495ED",GC.Spread.Sheets.LineStyle.dotted));
See Also

Reference

CellRange type