sheets.rows.cells.borderTopObject

The style information for the top border of the cell.

Example

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          rows: [
              { cells: [ 
                  { value: "Top border", borderTop: { color: "#cc0066", size: 2 } }
              ] },
              { cells: [ 
                  { value: "Regular cell" } 
              ] }
          ]
      }
  ]
});

workbook.toDataURLAsync().then(function(dataURL) {
  kendo.saveAs({
    dataURI: dataURL,
    fileName: "border-top-example.xlsx"
  });
});
</script>

sheets.rows.cells.borderTop.colorString

The color of the top border of the cell. While many standard CSS formats are supported, the canonical form is #ccff00.

Example

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          rows: [
              { cells: [ 
                  { value: "Maroon", borderTop: { color: "#800000", size: 1 } },
                  { value: "Navy", borderTop: { color: "#000080", size: 1 } },
                  { value: "Lime", borderTop: { color: "#00ff00", size: 1 } }
              ] }
          ]
      }
  ]
});

workbook.toDataURLAsync().then(function(dataURL) {
  kendo.saveAs({
    dataURI: dataURL,
    fileName: "top-border-colors-example.xlsx"
  });
});
</script>

sheets.rows.cells.borderTop.sizeNumber

The width (in pixels) of the border.

The allowed values are:

  • 1 - Results in a "thin" border.
  • 2 - Results in a "medium" border.
  • 3 - Results in a "thick" border.

Example - adding a top border to the cell

<script>
var workbook = new kendo.ooxml.Workbook({
sheets: [
 {
     rows: [
       { cells: [ { value: "Border", borderTop: { color: "#ff0000", size: 3 } } ] }
     ]
 }
]
});
workbook.toDataURLAsync().then(function(dataURL) {
  kendo.saveAs({
    dataURI: dataURL,
    fileName: "Test.xlsx"
  });
});
</script>