Edit this page

sheets.rows.cells.textAlign String

Sets the horizontal alignment of the cell value. Supported values are "left", "center" and "right".

Example - set the horizontal alignment

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          columns: [ { width: 200 } ],
          rows: [
            { cells: [ { value: "Left", textAlign: "left" } ] },
            { cells: [ { value: "Center", textAlign: "center" } ] },
            { cells: [ { value: "Right", textAlign: "right" } ] }
          ]
      }
  ]
});
kendo.saveAs({
  dataURI: workbook.toDataURL(),
  fileName: "Test.xlsx"
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy