asposecells.api
Class Name

Represents a defined name for a range of cells.

Example:

# Instantiating a Workbook object
workbook = Workbook()
# Accessing the first worksheet in the Excel file
worksheet = workbook.getWorksheets().get(0)
# Creating a named range
named_range = worksheet.getCells().createRange("B4", "G14")
# Setting the name of the named range
named_range.setName("TestRange")
# Saving the modified Excel file in default (that is Excel 2000) format
workbook.save("Book1.xls")

Property Getters/Setters Summary
methodgetComment()
methodsetComment(value)
           Gets and sets the commont of the name. Only applies for Excel 2007.
methodgetFullText()
           Gets the name full text of the object with the scope setting.
methodisReferred()
           Indicates whether this name is referred by other formulas.
methodisVisible()
methodsetVisible(value)
           Indicates whether the name is visible.
methodgetR1C1RefersTo()
methodsetR1C1RefersTo(value)
           Gets or sets a R1C1 reference of the Name.
methodgetRefersTo()
methodsetRefersTo(value)
           Returns or sets the formula that the name is defined to refer to, beginning with an equal sign.
methodgetSheetIndex()
methodsetSheetIndex(value)
           Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based)
methodgetText()
methodsetText(value)
           Gets the name text of the object.
 
Method Summary
methodgetRange()
           Gets the range if this name refers to a range.
methodgetRange(recalculate)
           Gets the range if this name refers to a range
methodgetRange(sheetIndex, row, column)
           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.
methodgetRanges()
           Gets all ranges referred by this name.
methodgetRanges(recalculate)
           Gets all ranges referred by this name.
methodgetReferredAreas(recalculate)
           Gets all references referred by this name.
methodgetRefersTo(isR1C1, isLocal)
           Get the reference of this Name.
methodsetRefersTo(refersTo, isR1C1, isLocal)
           Set the reference of this Name.
methodtoString()
           Returns a string represents the current Range object.
 

Property Getters/Setters Detail

getComment/setComment : String 

String getComment() / setComment(value)
Gets and sets the commont of the name. Only applies for Excel 2007.

getText/setText : String 

String getText() / setText(value)
Gets the name text of the object.

getFullText : String 

String getFullText()
Gets the name full text of the object with the scope setting.

getRefersTo/setRefersTo : String 

String getRefersTo() / setRefersTo(value)
Returns or sets the formula that the name is defined to refer to, beginning with an equal sign.

getR1C1RefersTo/setR1C1RefersTo : String 

String getR1C1RefersTo() / setR1C1RefersTo(value)
Gets or sets a R1C1 reference of the Name.

isReferred : boolean 

boolean isReferred()
Indicates whether this name is referred by other formulas.

isVisible/setVisible : boolean 

boolean isVisible() / setVisible(value)
Indicates whether the name is visible.

getSheetIndex/setSheetIndex : int 

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

Method Detail

getRefersTo

String getRefersTo(isR1C1, isLocal)
Get the reference of this Name.
Parameters:
isR1C1: boolean - Whether the reference needs to be formatted as R1C1.
isLocal: boolean - Whether the reference needs to be formatted by locale.

setRefersTo

 setRefersTo(refersTo, isR1C1, isLocal)
Set the reference of this Name.
Parameters:
refersTo: String - The reference.
isR1C1: boolean - Whether the reference is R1C1 format.
isLocal: boolean - Whether the reference is locale formatted.

toString

String toString()
Returns a string represents the current Range object.
Returns:

getRanges

Range[] getRanges()
Gets all ranges referred by this name.
Returns:
All ranges.

getRanges

Range[] getRanges(recalculate)
Gets all ranges referred by this name.
Parameters:
recalculate: boolean - whether recalcuate it if this name has been calcualted before this invocation.
Returns:
All ranges.

getReferredAreas

ReferredArea[] getReferredAreas(recalculate)
Gets all references referred by this name.
Parameters:
recalculate: boolean - whether recalcuate it if this name has been calcualted before this invocation.
Returns:
All ranges.

getRange

Range getRange()
Gets the range if this name refers to a range.
Returns:
The range.

getRange

Range getRange(recalculate)
Gets the range if this name refers to a range
Parameters:
recalculate: boolean - whether recalcuate it if this name has been calcualted before this invocation.
Returns:
The range.

getRange

Range getRange(sheetIndex, row, column)
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:
sheetIndex: int - The according sheet index.
row: int - The according row index.
column: int - The according column index
Returns:
The range.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.