| title | workbookRangeFormat resource type |
|---|---|
| description | A format object that encapsulates the range's font, fill, borders, alignment, and other properties. |
| ms.localizationpriority | medium |
| author | lumine2008 |
| ms.subservice | excel |
| doc_type | resourcePageType |
| toc.title | Range format |
| ms.date | 07/31/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
A format object that encapsulates the range's font, fill, borders, alignment, and other properties.
| Method | Return Type | Description |
|---|---|---|
| Get | workbookRangeFormat | Read properties and relationships of rangeFormat object. |
| Update range format | workbookRangeFormat | Update RangeFormat object. |
| List range borders | workbookRangeBorder collection | Get the list of workbookRangeBorder objects. |
| Create range borders | workbookRangeBorder | Create a new workbookRangeBorder object by posting to the borders collection. |
| Autofit columns | None | Changes the width of the columns of the current range to achieve the best fit for the current data in the columns. |
| Autofit rows | None | Changes the height of the rows of the current range to achieve the best fit for the current data in the columns. |
| Property | Type | Description |
|---|---|---|
| columnWidth | double | The width of all columns within the range. If the column widths aren't uniform, null will be returned. |
| horizontalAlignment | string | The horizontal alignment for the specified object. The possible values are: General, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed. |
| rowHeight | double | The height of all rows in the range. If the row heights aren't uniform null will be returned. |
| verticalAlignment | string | The vertical alignment for the specified object. The possible values are: Top, Center, Bottom, Justify, Distributed. |
| wrapText | Boolean | Indicates whether Excel wraps the text in the object. A null value indicates that the entire range doesn't have a uniform wrap setting. |
| Relationship | Type | Description |
|---|---|---|
| borders | workbookRangeBorder collection | Collection of border objects that apply to the overall range selected Read-only. |
| fill | workbookRangeFill | Returns the fill object defined on the overall range. Read-only. |
| font | workbookRangeFont | Returns the font object defined on the overall range selected Read-only. |
| protection | formatProtection | Returns the format protection object for a range. Read-only. |
The following JSON representation shows the resource type.
{
"columnWidth": 1024,
"horizontalAlignment": "string",
"rowHeight": 1024,
"verticalAlignment": "string",
"wrapText": true
}