borders property

  1. @override
Borders get borders
override

Gets/sets borders.

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set borders line style and color.
style.borders.all.lineStyle = LineStyle.thick;
style.borders.all.color = '#9954CC';
final Range range1 = sheet.getRangeByIndex(3, 4);
range1.number = 10;
range1.cellStyle = style;
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

@override
Borders get borders {
  return _borders;
}
  1. @override
set borders (Borders value)
override

Gets/sets borders.

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set borders line style and color.
style.borders.all.lineStyle = LineStyle.thick;
style.borders.all.color = '#9954CC';
final Range range1 = sheet.getRangeByIndex(3, 4);
range1.number = 10;
range1.cellStyle = style;
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

@override
set borders(Borders value) {
  final int last = _arrRanges.length;
  for (int index = 0; index < last; index++) {
    final Range range = _arrRanges[index];
    range.cellStyle.borders = value;
  }
}