# Column Width

By default, all columns in Excel have the same width of 64px.

If the cell value needs more space, it will be clipped. This article provides information on how to set the column width in pixels or enable automatic width calculation.

## Setting Fixed Column Widths

To manually set the column width in pixels, use the [`width`](https://www.telerik.com/kendo-jquery-ui/documentation/api/ooxml/workbook/configuration/sheets#sheetscolumns#sheetscolumnswidth) option.

```dojo
<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
    {
      columns: [
        { width: 100 }, { /* default width */ }, { width: 200 }
      ],
      rows: [
        {
          cells: [
            { value: "100 px" }, { value: "default" }, { value: "200px" }
          ]
        }
      ]
    }
  ]
});
workbook.toDataURLAsync().then(function (dataURI) {
    kendo.saveAs({
      dataURI: dataURI,
      fileName: "Test.xlsx",
    });
});
</script>
```

## Automatically Adjusting Widths to Content

To enable the automatic width calculation, set the [`autoWidth`](https://www.telerik.com/kendo-jquery-ui/documentation/api/ooxml/workbook/configuration/sheets#sheetscolumns#sheetscolumnsautowidth) option to `true`. When set, the he column stretches to accommodate the longest cell value.

```dojo
<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
    {
      columns: [
        { /* default width */ }, { autoWidth: true }
      ],
      rows: [
        {
          cells: [
            { value: "long text is clipped if autoWidth is not set to true" }, { value: "long text fits when autoWidth is set to true" }
          ]
        }
      ]
    }
  ]
});
workbook.toDataURLAsync().then(function (dataURI) {
    kendo.saveAs({
      dataURI: dataURI,
      fileName: "Test.xlsx",
    });
});
</script>
```

## See Also

* [Introduction to the Excel Export Functionality](https://www.telerik.com/kendo-jquery-ui/documentation/framework/excel/introduction)
* [Customizing the Appearance](https://www.telerik.com/kendo-jquery-ui/documentation/framework/excel/appearance)
* [Freezing Rows and Columns](https://www.telerik.com/kendo-jquery-ui/documentation/framework/excel/freeze-pane)
* [Spanning Cells across Rows and Columns](https://www.telerik.com/kendo-jquery-ui/documentation/framework/excel/colspan-rowspan)
* [Creating Multiple Sheets](https://www.telerik.com/kendo-jquery-ui/documentation/framework/excel/sheets)
* [Exporting the Kendo UI DataSource to Excel](https://www.telerik.com/kendo-jquery-ui/documentation/framework/excel/extract-datasoruce)
