Skip to main content

ApiRange

Represents the ApiRange class.

Properties

NameTypeDescription
AddressstringReturns the range address.
AlignHorizontal'left' | 'right' | 'center' | 'justify'Sets the text horizontal alignment to the current cell range.
AlignVertical'center' | 'bottom' | 'top' | 'distributed' | 'justify'Sets the text vertical alignment to the current cell range.
AreasApiAreasReturns a collection of the areas.
BoldbooleanSets the bold property to the text characters from the current cell or cell range.
CellsApiRangeReturns a Range object that represents all the cells in the specified range or a specified cell.
CharactersApiCharactersReturns the ApiCharacters object that represents a range of characters within the object text. Use the ApiCharacters object to format characters within a text string.
ColnumberReturns the column number for the selected cell.
ColsApiRangeReturns the ApiRange object that represents the columns of the specified range.
ColumnWidthnumberReturns or sets the width of all the columns in the specified range measured in points.
CommentsApiComment | nullReturns the ApiComment collection that represents all the comments from the specified worksheet.
CountnumberReturns the rows or columns count.
DefNameApiNameReturns the ApiName object.
FillColorApiColor | 'No Fill'Returns or sets the background color of the current cell range.
FontColorApiColorSets the text color to the current cell range with the previously created color object.
FontNamestringSets the specified font family as the font name for the current cell range.
FontSizenumberSets the font size to the characters of the current cell range.
FormulastringReturns a formula from the first cell of the specified range or sets it to this cell.
HeightnumberReturns a value that represents the range height measured in points.
HiddenbooleanReturns or sets the value hiding property.
ItalicbooleanSets the italic property to the text characters in the current cell or cell range.
MergeAreaApiRangeReturns the cell or cell range from the merge area.
NumberFormatstringSets a value that represents the format code for the object.
Orientation'xlDownward' | 'xlHorizontal' | 'xlUpward' | 'xlVertical'Sets an angle to the current cell range.
PivotTableApiPivotTable | nullReturns the ApiPivotTable object that represents the pivot table report containing the upper-left corner of the specified range.
RownumberReturns the row number for the selected cell.
RowHeightnumberReturns or sets the height of the first row in the specified range measured in points.
RowsApiRangeReturns the ApiRange object that represents the rows of the specified range.
StrikeoutbooleanSets a value that indicates whether the contents of the current cell or cell range are displayed struck through.
TextstringReturns the text from the first cell of the specified range or sets it to this cell.
Underline'none' | 'single' | 'singleAccounting' | 'double' | 'doubleAccounting'Sets the type of underline applied to the font.
ValuestringReturns a value from the first cell of the specified range or sets it to this cell.
Value2stringReturns the value2 (value without format) from the first cell of the specified range or sets it to this cell.
WidthnumberReturns a value that represents the range width measured in points.
WorksheetApiWorksheetReturns the ApiWorksheet object that represents the worksheet containing the specified range.
WrapTextbooleanReturns the information about the wrapping cell style or specifies whether the words in the cell must be wrapped to fit the cell size or not.

Methods

MethodReturnsDescription
AddCommentApiComment | nullAdds a comment to the current range.
AutoFitNoneChanges the width of the columns or the height of the rows in the range to achieve the best fit.
ClearNoneClears the current range.
CopyNoneCopies the range to the specified range or to the clipboard.
CutNoneCuts the range and save it to the clipboard or paste it to the specified range.
DeleteNoneDeletes the Range object.
EndApiRangeReturns a Range object that represents the end in the specified direction in the specified range.
FindApiRange | nullFinds specific information in the current range.
FindNextApiRange | nullContinues a search that was begun with the ApiRange#Find method. Finds the next cell that matches those same conditions and returns the ApiRange object that represents that cell. This does not affect the selection or the active cell.
FindPreviousApiRange | nullContinues a search that was begun with the ApiRange#Find method. Finds the previous cell that matches those same conditions and returns the ApiRange object that represents that cell. This does not affect the selection or the active cell.
ForEachNoneExecutes a provided function once for each cell.
GetAddressstring | nullReturns the range address.
GetAreasApiAreasReturns a collection of the ranges.
GetCellsApiRangeReturns a Range object that represents all the cells in the specified range or a specified cell.
GetCharactersApiCharactersReturns the ApiCharacters object that represents a range of characters within the object text. Use the ApiCharacters object to format characters within a text string.
GetClassType"range"Returns a type of the ApiRange class.
GetColnumberReturns a column number for the selected cell.
GetColsApiRange | nullReturns a Range object that represents the columns in the specified range.
GetColumnWidthnumberReturns the column width value.
GetCommentApiComment | nullReturns the ApiComment object of the current range.
GetCountnumberReturns the rows or columns count.
GetDefNameApiNameReturns the ApiName object of the current range.
GetFillColorApiColor | 'No Fill'Returns the background color for the current cell range. Returns 'No Fill' when the color of the background in the cell / cell range is null.
GetFormulastring | string[][]Returns a formula of the specified range.
GetHiddenbooleanReturns the value hiding property. The specified range must span an entire column or row.
GetNumberFormatstring | nullReturns a value that represents the format code for the current range.
GetOrientationAngleReturns the current range angle.
GetPivotTableApiPivotTable | nullReturns the ApiPivotTable object that represents the pivot table report containing the upper-left corner of the specified range.
GetRownumberReturns a row number for the selected cell.
GetRowHeightptReturns the row height value.
GetRowsApiRange | nullReturns a Range object that represents the rows in the specified range. If the specified row is outside the Range object, a new Range will be returned that represents the cells between the columns of the original range in the specified row.
GetTextstring | string[][]Returns the text of the specified range.
GetValuestring | string[][]Returns a value of the specified range.
GetValue2string | string[][]Returns the Value2 property (value without format) of the specified range.
GetWorksheetApiWorksheetReturns the Worksheet object that represents the worksheet containing the specified range. It will be available in the read-only mode.
GetWrapTextbooleanReturns the information about the wrapping cell style.
InsertNoneInserts a cell or a range of cells into the worksheet or macro sheet and shifts other cells away to make space.
MergeNoneMerges the selected cell range into a single cell or a cell row.
PasteNonePastes the Range object to the specified range.
PasteSpecialNonePastes the Range object to the specified range using the special paste options.
ReplaceApiRange | nullReplaces specific information to another one in a range.
SelectNoneSelects the current range.
SetAlignHorizontalbooleanSets the horizontal alignment of the text in the current cell range.
SetAlignVerticalbooleanSets the vertical alignment of the text in the current cell range.
SetAutoFilterNoneAdds an AutoFilter to the current range.
SetBoldNoneSets the bold property to the text characters in the current cell or cell range.
SetBordersNoneSets the border to the cell / cell range with the parameters specified.
SetColumnWidthNoneSets the width of all the columns in the current range.\ One unit of column width is equal to the width of one character in the Normal style.\ For proportional fonts, the width of the character 0 (zero) is used.
SetFillColorNoneSets the background color to the current cell range with the previously created color object.\ Sets 'No Fill' when previously created color object is null.
SetFontColorNoneSets the text color to the current cell range with the previously created color object.
SetFontNameNoneSets the specified font family as the font name for the current cell range.
SetFontSizeNoneSets the font size to the characters of the current cell range.
SetHiddenNoneSets the value hiding property. The specified range must span an entire column or row.
SetItalicNoneSets the italic property to the text characters in the current cell or cell range.
SetNumberFormatNoneSpecifies whether a number in the cell should be treated like number, currency, date, time, etc. or just like text.
SetOffsetNoneSets the cell offset.
SetOrientationNoneSets an angle to the current cell range.
SetRowHeightNoneSets the row height value.
SetSortNoneSorts the cells in the given range by the parameters specified in the request.
SetStrikeoutNoneSpecifies that the contents of the cell / cell range are displayed with a single horizontal line through the center of the contents.
SetUnderlineNoneSpecifies that the contents of the current cell / cell range are displayed along with a line appearing directly below the character.
SetValuebooleanSets a value to the current cell or cell range.
SetWrapNoneSpecifies whether the words in the cell must be wrapped to fit the cell size or not.
UnMergeNoneSplits the selected merged cell range into the single cells.