Aspose::Cells::IRange Class Referenceabstract

Encapsulates the object that represents a range of cells within a spreadsheet. More...

Inherits Object.

Public Member Functions

virtual intrusive_ptr< Aspose::Cells::Systems::Collections::IEnumerator > GetEnumerator ()=0
 Gets the cells enumerator More...
 
virtual bool IsIntersect (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Indicates whether the range is intersect. More...
 
virtual intrusive_ptr< Aspose::Cells::IRangeIntersect (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Returns an IRange object that represents the rectangular intersection of two ranges. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Collections::ArrayList > Union (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Returns the union of two ranges. More...
 
virtual Aspose::Cells::Systems::Int32 GetRowCount ()=0
 Gets the count of rows in the range. More...
 
virtual Aspose::Cells::Systems::Int32 GetColumnCount ()=0
 Gets the count of columns in the range. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetName ()=0
 Gets the name of the range. More...
 
virtual void SetName (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Sets the name of the range. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetRefersTo ()=0
 Gets the range's refers to. More...
 
virtual Aspose::Cells::Systems::Int32 GetFirstRow ()=0
 Gets the index of the first row of the range. More...
 
virtual Aspose::Cells::Systems::Int32 GetFirstColumn ()=0
 Gets the index of the first column of the range. More...
 
virtual void Merge ()=0
 Combines a range of cells into a single cell.
More...
 
virtual void UnMerge ()=0
 Unmerges merged cells of this range. More...
 
virtual void PutValue (intrusive_ptr< Aspose::Cells::Systems::String > stringValue, bool isConverted, bool setStyle)=0
 Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Object > GetValue ()=0
 Gets the value of the range. More...
 
virtual void SetValue (intrusive_ptr< Aspose::Cells::Systems::Object > value)=0
 Sets the value of the range. More...
 
virtual void ApplyIStyle (intrusive_ptr< Aspose::Cells::IStyle > style, intrusive_ptr< Aspose::Cells::IStyleFlag > flag)=0
 Applies formatting for a whole range. More...
 
virtual void SetIStyle (intrusive_ptr< Aspose::Cells::IStyle > style)=0
 Sets the style of the range. More...
 
virtual void SetOutlineBorders (Aspose::Cells::CellBorderType borderStyle, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > borderColor)=0
 Sets the outline borders around a range of cells with same border style and color. More...
 
virtual void SetOutlineBorders (intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::CellBorderType >> borderStyles, intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::Drawing::Color *>> borderColors)=0
 Sets out line borders around a range of cells. More...
 
virtual void SetOutlineBorder (Aspose::Cells::BorderType borderEdge, Aspose::Cells::CellBorderType borderStyle, intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > borderColor)=0
 Sets outline border around a range of cells. More...
 
virtual Aspose::Cells::Systems::Double GetColumnWidth ()=0
 Sets or gets the column width of this range More...
 
virtual void SetColumnWidth (Aspose::Cells::Systems::Double value)=0
 Sets or gets the column width of this range More...
 
virtual Aspose::Cells::Systems::Double GetRowHeight ()=0
 Sets or gets the height of rows in this range More...
 
virtual void SetRowHeight (Aspose::Cells::Systems::Double value)=0
 Sets or gets the height of rows in this range More...
 
virtual void MoveTo (Aspose::Cells::Systems::Int32 destRow, Aspose::Cells::Systems::Int32 destColumn)=0
 Move the current range to the destination range. More...
 
virtual void CopyData (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Copies cell data (including formulas) from a source range. More...
 
virtual void CopyValue (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Copies cell value from a source range. More...
 
virtual void CopyStyle (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Copies style settings from a source range. More...
 
virtual void Copy (intrusive_ptr< Aspose::Cells::IRange > range, intrusive_ptr< Aspose::Cells::IPasteOptions > options)=0
 Copying the range with paste special options. More...
 
virtual void Copy (intrusive_ptr< Aspose::Cells::IRange > range)=0
 Copies data (including formulas), formatting, drawing objects etc. from a source range. More...
 
virtual intrusive_ptr< Aspose::Cells::ICellGetObjectByIndex (Aspose::Cells::Systems::Int32 rowIndex, Aspose::Cells::Systems::Int32 columnIndex)=0
 Gets ICell object in this range. More...
 
virtual intrusive_ptr< Aspose::Cells::ICellGetICellOrNull (Aspose::Cells::Systems::Int32 rowIndex, Aspose::Cells::Systems::Int32 columnIndex)=0
 Gets ICell object or null in this range. More...
 
virtual intrusive_ptr< Aspose::Cells::IWorksheetGetIWorksheet ()=0
 Gets the IWorksheet object which contains this range. More...
 

Detailed Description

Encapsulates the object that represents a range of cells within a spreadsheet.

Member Function Documentation

◆ ApplyIStyle()

virtual void Aspose::Cells::IRange::ApplyIStyle ( intrusive_ptr< Aspose::Cells::IStyle style,
intrusive_ptr< Aspose::Cells::IStyleFlag flag 
)
pure virtual

Applies formatting for a whole range.

Parameters
styleThe style object which will be applied.
Parameters
flagFlags which indicates applied formatting properties.

Each cell in this range will contains an IStyle object. So this is a memory-consuming method. Please use it carefully.

◆ Copy() [1/2]

virtual void Aspose::Cells::IRange::Copy ( intrusive_ptr< Aspose::Cells::IRange range,
intrusive_ptr< Aspose::Cells::IPasteOptions options 
)
pure virtual

Copying the range with paste special options.

Parameters
rangeThe source range.
optionsThe paste special options.

◆ Copy() [2/2]

virtual void Aspose::Cells::IRange::Copy ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Copies data (including formulas), formatting, drawing objects etc. from a source range.

Parameters
rangeSource IRange object.

◆ CopyData()

virtual void Aspose::Cells::IRange::CopyData ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Copies cell data (including formulas) from a source range.

Parameters
rangeSource IRange object.

◆ CopyStyle()

virtual void Aspose::Cells::IRange::CopyStyle ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Copies style settings from a source range.

Parameters
rangeSource IRange object.

◆ CopyValue()

virtual void Aspose::Cells::IRange::CopyValue ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Copies cell value from a source range.

Parameters
rangeSource IRange object.

◆ GetColumnCount()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IRange::GetColumnCount ( )
pure virtual

Gets the count of columns in the range.

◆ GetColumnWidth()

virtual Aspose::Cells::Systems::Double Aspose::Cells::IRange::GetColumnWidth ( )
pure virtual

Sets or gets the column width of this range

◆ GetEnumerator()

virtual intrusive_ptr<Aspose::Cells::Systems::Collections::IEnumerator> Aspose::Cells::IRange::GetEnumerator ( )
pure virtual

Gets the cells enumerator

Returns
The cells enumerator

◆ GetFirstColumn()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IRange::GetFirstColumn ( )
pure virtual

Gets the index of the first column of the range.

◆ GetFirstRow()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IRange::GetFirstRow ( )
pure virtual

Gets the index of the first row of the range.

◆ GetICellOrNull()

virtual intrusive_ptr<Aspose::Cells::ICell> Aspose::Cells::IRange::GetICellOrNull ( Aspose::Cells::Systems::Int32  rowIndex,
Aspose::Cells::Systems::Int32  columnIndex 
)
pure virtual

Gets ICell object or null in this range.

Parameters
rowIndexRow index in this range, zero based.
Parameters
columnIndexColumn index in this range, zero based.
Returns
ICell object.

◆ GetIWorksheet()

virtual intrusive_ptr<Aspose::Cells::IWorksheet> Aspose::Cells::IRange::GetIWorksheet ( )
pure virtual

Gets the IWorksheet object which contains this range.

◆ GetName()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IRange::GetName ( )
pure virtual

Gets the name of the range.

◆ GetObjectByIndex()

virtual intrusive_ptr<Aspose::Cells::ICell> Aspose::Cells::IRange::GetObjectByIndex ( Aspose::Cells::Systems::Int32  rowIndex,
Aspose::Cells::Systems::Int32  columnIndex 
)
pure virtual

Gets ICell object in this range.

Parameters
rowIndexRow index in this range, zero based.
Parameters
columnIndexColumn index in this range, zero based.
Returns
ICell object.

◆ GetRefersTo()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IRange::GetRefersTo ( )
pure virtual

Gets the range's refers to.

◆ GetRowCount()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IRange::GetRowCount ( )
pure virtual

Gets the count of rows in the range.

◆ GetRowHeight()

virtual Aspose::Cells::Systems::Double Aspose::Cells::IRange::GetRowHeight ( )
pure virtual

Sets or gets the height of rows in this range

◆ GetValue()

virtual intrusive_ptr<Aspose::Cells::Systems::Object> Aspose::Cells::IRange::GetValue ( )
pure virtual

Gets the value of the range.

If the range contains multiple cells, return a two-dimension Array object. If applies object array to the range, it should be a two-dimension Array object.

◆ Intersect()

virtual intrusive_ptr<Aspose::Cells::IRange> Aspose::Cells::IRange::Intersect ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Returns an IRange object that represents the rectangular intersection of two ranges.

Parameters
rangeThe intersecting range.
Returns
A Range object

If the two ranges are not intersected, returns null.

◆ IsIntersect()

virtual bool Aspose::Cells::IRange::IsIntersect ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Indicates whether the range is intersect.

Parameters
rangeThe range.
Returns
Whether the range is intersect.

If the two ranges area not in the same worksheet, return false.

◆ Merge()

virtual void Aspose::Cells::IRange::Merge ( )
pure virtual

Combines a range of cells into a single cell.

Reference the merged cell via the address of the upper-left cell in the range.

◆ MoveTo()

virtual void Aspose::Cells::IRange::MoveTo ( Aspose::Cells::Systems::Int32  destRow,
Aspose::Cells::Systems::Int32  destColumn 
)
pure virtual

Move the current range to the destination range.

Parameters
destRowThe start row of the destination range.
Parameters
destColumnThe start column of the destination range.

◆ PutValue()

virtual void Aspose::Cells::IRange::PutValue ( intrusive_ptr< Aspose::Cells::Systems::String >  stringValue,
bool  isConverted,
bool  setStyle 
)
pure virtual

Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset.

Parameters
stringValueInput value
Parameters
isConvertedTrue: converted to other data type if appropriate.
Parameters
setStyleTrue: set the number format to cell's style when converting to other data type

◆ SetColumnWidth()

virtual void Aspose::Cells::IRange::SetColumnWidth ( Aspose::Cells::Systems::Double  value)
pure virtual

Sets or gets the column width of this range

◆ SetIStyle()

virtual void Aspose::Cells::IRange::SetIStyle ( intrusive_ptr< Aspose::Cells::IStyle style)
pure virtual

Sets the style of the range.

Parameters
styleThe Style object.

◆ SetName()

virtual void Aspose::Cells::IRange::SetName ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Sets the name of the range.

Named range is supported. For example,

range->SetName(new String("Sheet1!MyRange"));

◆ SetOutlineBorder()

virtual void Aspose::Cells::IRange::SetOutlineBorder ( Aspose::Cells::BorderType  borderEdge,
Aspose::Cells::CellBorderType  borderStyle,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  borderColor 
)
pure virtual

Sets outline border around a range of cells.

Parameters
borderEdgeBorder edge.
Parameters
borderStyleBorder style.
Parameters
borderColorBorder color.

◆ SetOutlineBorders() [1/2]

virtual void Aspose::Cells::IRange::SetOutlineBorders ( Aspose::Cells::CellBorderType  borderStyle,
intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  borderColor 
)
pure virtual

Sets the outline borders around a range of cells with same border style and color.

Parameters
borderStyleBorder style.
Parameters
borderColorBorder color.

◆ SetOutlineBorders() [2/2]

virtual void Aspose::Cells::IRange::SetOutlineBorders ( intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::CellBorderType >>  borderStyles,
intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::Drawing::Color *>>  borderColors 
)
pure virtual

Sets out line borders around a range of cells.

Parameters
borderStylesBorder styles.
Parameters
borderColorsBorder colors.

Both the length of borderStyles and borderColors must be 4. The order of of borderStyles and borderColors must be top, bottom, left, right

◆ SetRowHeight()

virtual void Aspose::Cells::IRange::SetRowHeight ( Aspose::Cells::Systems::Double  value)
pure virtual

Sets or gets the height of rows in this range

◆ SetValue()

virtual void Aspose::Cells::IRange::SetValue ( intrusive_ptr< Aspose::Cells::Systems::Object >  value)
pure virtual

Sets the value of the range.

If the range contains multiple cells, return a two-dimension Array object. If applies object array to the range, it should be a two-dimension Array object.

◆ Union()

virtual intrusive_ptr<Aspose::Cells::Systems::Collections::ArrayList> Aspose::Cells::IRange::Union ( intrusive_ptr< Aspose::Cells::IRange range)
pure virtual

Returns the union of two ranges.

Parameters
rangeThe range
Returns
The union of two ranges.

◆ UnMerge()

virtual void Aspose::Cells::IRange::UnMerge ( )
pure virtual

Unmerges merged cells of this range.