## Worksheet::AutoFitColumn(int32_t, int32_t, int32_t) method


Autofits the column width.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumn(int32_t columnIndex, int32_t firstRow, int32_t lastRow)
```


| Parameter | Type | Description |
| --- | --- | --- |
| columnIndex | int32_t | [Column](../../column/) index. |
| firstRow | int32_t | First row index. |
| lastRow | int32_t | Last row index. |
## Remarks



This method autofits a row based on content in a range of cells within the row. 
## See Also

* Class [Vector](../../vector/)
* Class [Worksheet](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## Worksheet::AutoFitColumn(int32_t) method


Autofits the column width.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumn(int32_t columnIndex)
```


| Parameter | Type | Description |
| --- | --- | --- |
| columnIndex | int32_t | [Column](../../column/) index. |
## Remarks



AutoFitColumn is an imprecise function.
## See Also

* Class [Vector](../../vector/)
* Class [Worksheet](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
