## Worksheet::AutoFitColumns() method


Autofits all columns in this worksheet.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumns()
```

## See Also

* Class [Vector](../../vector/)
* Class [Worksheet](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## Worksheet::AutoFitColumns(const AutoFitterOptions\&) method


Autofits all columns in this worksheet.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumns(const AutoFitterOptions &options)
```


| Parameter | Type | Description |
| --- | --- | --- |
| options | const AutoFitterOptions\& | The auto fitting options |

## See Also

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


Autofits the columns width.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumns(int32_t firstColumn, int32_t lastColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| firstColumn | int32_t | First column index. |
| lastColumn | int32_t | Last column index. |
## Remarks



AutoFitColumn is an imprecise function.
## See Also

* Class [Vector](../../vector/)
* Class [Worksheet](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## Worksheet::AutoFitColumns(int32_t, int32_t, const AutoFitterOptions\&) method


Autofits the columns width.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumns(int32_t firstColumn, int32_t lastColumn, const AutoFitterOptions &options)
```


| Parameter | Type | Description |
| --- | --- | --- |
| firstColumn | int32_t | First column index. |
| lastColumn | int32_t | Last column index. |
| options | const AutoFitterOptions\& | The auto fitting options |
## Remarks



AutoFitColumn is an imprecise function.
## See Also

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


Autofits the columns width.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumns(int32_t firstRow, int32_t firstColumn, int32_t lastRow, int32_t lastColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| firstRow | int32_t | First row index. |
| firstColumn | int32_t | First column index. |
| lastRow | int32_t | Last row index. |
| lastColumn | int32_t | Last column index. |
## Remarks



AutoFitColumn is an imprecise function.
## See Also

* Class [Vector](../../vector/)
* Class [Worksheet](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## Worksheet::AutoFitColumns(int32_t, int32_t, int32_t, int32_t, const AutoFitterOptions\&) method


Autofits the columns width.

```cpp
void Aspose::Cells::Worksheet::AutoFitColumns(int32_t firstRow, int32_t firstColumn, int32_t lastRow, int32_t lastColumn, const AutoFitterOptions &options)
```


| Parameter | Type | Description |
| --- | --- | --- |
| firstRow | int32_t | First row index. |
| firstColumn | int32_t | First column index. |
| lastRow | int32_t | Last row index. |
| lastColumn | int32_t | Last column index. |
| options | const AutoFitterOptions\& | The auto fitting options |
## Remarks



AutoFitColumn is an imprecise function.
## See Also

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