Aspose::Cells::IName Class Referenceabstract

Represents a defined name for a range of cells. More...

Inherits Object.

Public Member Functions

virtual intrusive_ptr< Aspose::Cells::Systems::String > GetComment ()=0
 Gets the comment of the name. Only applies for Excel 2007. More...
 
virtual void SetComment (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Sets the comment of the name. Only applies for Excel 2007. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetText ()=0
 Gets the name text of the object. More...
 
virtual void SetText (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Gets the name text of the object. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetFullText ()=0
 Gets the name full text of the object with the scope setting. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetRefersTo ()=0
 Returns or sets the formula that the name is defined to refer to, beginning with an equal sign. More...
 
virtual void SetRefersTo (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Returns or sets the formula that the name is defined to refer to, beginning with an equal sign. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetR1C1RefersTo ()=0
 Gets a R1C1 reference of the IName More...
 
virtual void SetR1C1RefersTo (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Sets a R1C1 reference of the IName More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetRefersTo (bool isR1C1, bool isLocal)=0
 Get the reference of this Name. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetRefersTo (bool isR1C1, bool isLocal, Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Get the reference of this Name based on specified cell. More...
 
virtual void SetRefersTo (intrusive_ptr< Aspose::Cells::Systems::String > refersTo, bool isR1C1, bool isLocal)=0
 Set the reference of this Name. More...
 
virtual bool IsReferred ()=0
 Indicates whether this name is referred by other formulas. More...
 
virtual bool IsVisible ()=0
 Indicates whether the name is visible. More...
 
virtual void SetVisible (bool value)=0
 Indicates whether the name is visible. More...
 
virtual Aspose::Cells::Systems::Int32 GetSheetIndex ()=0
 Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based) More...
 
virtual void SetSheetIndex (Aspose::Cells::Systems::Int32 value)=0
 Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based) More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > ToString ()=0
 Returns a string represents the current Range object. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::IRange * > > GetIRanges ()=0
 Gets all ranges referred by this name. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::IRange * > > GetIRanges (bool recalculate)=0
 Gets all ranges referred by this name. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::IReferredArea * > > GetIReferredAreas (bool recalculate)=0
 Gets all references referred by this name. More...
 
virtual intrusive_ptr< Aspose::Cells::IRangeGetIRange ()=0
 Gets the range if this name refers to a range. More...
 
virtual intrusive_ptr< Aspose::Cells::IRangeGetIRange (bool recalculate)=0
 Gets the range if this name refers to a range More...
 
virtual intrusive_ptr< Aspose::Cells::IRangeGetIRange (Aspose::Cells::Systems::Int32 sheetIndex, Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Gets the range if this name refers to a range. If the reference of this name is not absolute, the range may be different for different cell. More...
 

Detailed Description

Represents a defined name for a range of cells.

[C++]
//Instantiating a Workbook object
intrusive_ptr<Aspose::Cells::IWorkbook> workbook = Factory::CreateIWorkbook();
//Accessing the first worksheet in the Excel file
intrusive_ptr<Aspose::Cells::IWorksheet> worksheet = workbook->GetIWorksheets()->GetObjectByIndex(0);
//Creating a named range
intrusive_ptr<IRange> range = worksheet->GetICells()->CreateIRange(new String("B4"), new String("G14"));
//Setting the name of the named range
range->SetName(new String("TestRange"));
//Saving the modified Excel file in default (that is Excel 2000) format
workbook->Save(new String("C:\\INameTestOutput.xls"));

Member Function Documentation

◆ GetComment()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::GetComment ( )
pure virtual

Gets the comment of the name. Only applies for Excel 2007.

◆ GetFullText()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::GetFullText ( )
pure virtual

Gets the name full text of the object with the scope setting.

◆ GetIRange() [1/3]

virtual intrusive_ptr<Aspose::Cells::IRange> Aspose::Cells::IName::GetIRange ( )
pure virtual

Gets the range if this name refers to a range.

Returns
The range.

◆ GetIRange() [2/3]

virtual intrusive_ptr<Aspose::Cells::IRange> Aspose::Cells::IName::GetIRange ( bool  recalculate)
pure virtual

Gets the range if this name refers to a range

Parameters
recalculatewhether recalculate it if this name has been calculated before this invocation.
Returns
The range.

◆ GetIRange() [3/3]

virtual intrusive_ptr<Aspose::Cells::IRange> Aspose::Cells::IName::GetIRange ( Aspose::Cells::Systems::Int32  sheetIndex,
Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Gets the range if this name refers to a range. If the reference of this name is not absolute, the range may be different for different cell.

Parameters
sheetIndexThe according sheet index.
rowThe according row index.
columnThe according column index
Returns
The range.

◆ GetIRanges() [1/2]

virtual intrusive_ptr<Aspose::Cells::Systems::Array1D<Aspose::Cells::IRange*> > Aspose::Cells::IName::GetIRanges ( )
pure virtual

Gets all ranges referred by this name.

Returns
All ranges.

◆ GetIRanges() [2/2]

virtual intrusive_ptr<Aspose::Cells::Systems::Array1D<Aspose::Cells::IRange*> > Aspose::Cells::IName::GetIRanges ( bool  recalculate)
pure virtual

Gets all ranges referred by this name.

Parameters
recalculatewhether recalculate it if this name has been calculated before this invocation.
Returns
All ranges.

◆ GetIReferredAreas()

virtual intrusive_ptr<Aspose::Cells::Systems::Array1D<Aspose::Cells::IReferredArea*> > Aspose::Cells::IName::GetIReferredAreas ( bool  recalculate)
pure virtual

Gets all references referred by this name.

Parameters
recalculatewhether recalculate it if this name has been calculated before this invocation.
Returns
All ranges.

◆ GetR1C1RefersTo()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::GetR1C1RefersTo ( )
pure virtual

Gets a R1C1 reference of the IName

◆ GetRefersTo() [1/3]

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

Returns or sets the formula that the name is defined to refer to, beginning with an equal sign.

◆ GetRefersTo() [2/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::GetRefersTo ( bool  isR1C1,
bool  isLocal 
)
pure virtual

Get the reference of this Name.

Parameters
isR1C1Whether the reference needs to be formatted as R1C1.
isLocalWhether the reference needs to be formatted by locale.

◆ GetRefersTo() [3/3]

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::GetRefersTo ( bool  isR1C1,
bool  isLocal,
Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Get the reference of this Name based on specified cell.

Parameters
isR1C1Whether the reference needs to be formatted as R1C1.
isLocalWhether the reference needs to be formatted by locale.
rowThe row index of the cell.
columnThe column index of the cell.

◆ GetSheetIndex()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IName::GetSheetIndex ( )
pure virtual

Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based)

◆ GetText()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::GetText ( )
pure virtual

Gets the name text of the object.

◆ IsReferred()

virtual bool Aspose::Cells::IName::IsReferred ( )
pure virtual

Indicates whether this name is referred by other formulas.

◆ IsVisible()

virtual bool Aspose::Cells::IName::IsVisible ( )
pure virtual

Indicates whether the name is visible.

◆ SetComment()

virtual void Aspose::Cells::IName::SetComment ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Sets the comment of the name. Only applies for Excel 2007.

◆ SetR1C1RefersTo()

virtual void Aspose::Cells::IName::SetR1C1RefersTo ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Sets a R1C1 reference of the IName

◆ SetRefersTo() [1/2]

virtual void Aspose::Cells::IName::SetRefersTo ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Returns or sets the formula that the name is defined to refer to, beginning with an equal sign.

◆ SetRefersTo() [2/2]

virtual void Aspose::Cells::IName::SetRefersTo ( intrusive_ptr< Aspose::Cells::Systems::String >  refersTo,
bool  isR1C1,
bool  isLocal 
)
pure virtual

Set the reference of this Name.

Parameters
refersToThe reference.
isR1C1Whether the reference is R1C1 format.
isLocalWhether the reference is locale formatted.

◆ SetSheetIndex()

virtual void Aspose::Cells::IName::SetSheetIndex ( Aspose::Cells::Systems::Int32  value)
pure virtual

Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based)

◆ SetText()

virtual void Aspose::Cells::IName::SetText ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Gets the name text of the object.

◆ SetVisible()

virtual void Aspose::Cells::IName::SetVisible ( bool  value)
pure virtual

Indicates whether the name is visible.

◆ ToString()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IName::ToString ( )
pure virtual

Returns a string represents the current Range object.

Returns