RangeFormat resource type

A format object encapsulating the range's font, fill, borders, alignment, and other properties.

Methods

Method Return Type Description
Get RangeFormat WorkbookRangeFormat Read properties and relationships of rangeFormat object.
Create RangeBorder WorkbookRangeBorder Create a new RangeBorder by posting to the borders collection.
List borders WorkbookRangeBorder collection Get a RangeBorder object collection.
Update WorkbookRangeFormat Update RangeFormat object.
Autofitcolumns None Changes the width of the columns of the current range to achieve the best fit, based on the current data in the columns.
Autofitrows None Changes the height of the rows of the current range to achieve the best fit, based on the current data in the columns.

Properties

Property Type Description
columnWidth double Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned.
horizontalAlignment string Represents the horizontal alignment for the specified object. The possible values are: General, Left, Center, Right, Fill, Justify, CenterAcrossSelection, Distributed.
rowHeight double Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned.
verticalAlignment string Represents the vertical alignment for the specified object. The possible values are: Top, Center, Bottom, Justify, Distributed.
wrapText boolean Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting

Relationships

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 WorkbookFormatProtection Returns the format protection object for a range. Read-only.

JSON representation

Here is a JSON representation of the resource.

{
  "columnWidth": 1024,
  "horizontalAlignment": "string",
  "rowHeight": 1024,
  "verticalAlignment": "string",
  "wrapText": true
}