TXlsNamedRange Class
An Excel named range.
Syntax
Namespace: FlexCel.Core
public class TXlsNamedRange: TXlsCellRange
Constructors
Methods
Name | Description |
---|---|
Equals | Returns true if both objects are equal. |
GetHashCode | Returns the hashcode of the object. |
GetInternalName | Returns the string that corresponds to an internal name. |
ToString | A human-readable representation of the range. |
IsValidRangeName | Returns true if the string is a valid name for a named range. Valid names must start with a letter or an underscore |
GetRanges | Returns a list of ranges and cells included in this name. This can be used to parse for example the PRINT_TITLES range, which might be something like "1:1,A:A". ("," is the union operator in Excel formulas).This method would return an array with the ranges 1:1 and A:A. |
Operators
Name | Description |
---|---|
Equality | Returns true if both objects are equal. Note this is for backwards compatibility, this is a class and not immutable, so this method should return true if references are different. But that would break old code. |
Inequality | Returns true if both objects do not have the same value. Note this is for backwards compatibility, this is a class and not immutable, so this method should return true if references are different. But that would break old code. |
Properties
Name | Description |
---|---|
Name | The name of the range. |
SheetIndex | The Sheet index where the row and col properties apply. 1-based. When RangeFormula is set, it is not used. |
NameSheetIndex | The sheet index for the name (1 based). A named range can have the same name than other as long as they are on different sheets. The default value(0) means a global named range, not tied to any specific sheet. |
OptionFlags | Options of the range. You can access the options by using the corresponding properties. (Hidden, BuiltIn, etc). You can use this property to set them all at the same time. You can get the properties by OR'ing the following values: 01. Name is hidden. Corresponds to the property Hidden. 02. Name is a function. Corresponds to the property Function. 04. Name is a VB procedure. If set you also need to set 08 (name is a macro). Corresponds to the property...[more] |
RangeFormula | This is a formula defining the range. It can be used to define complex ranges. For example you can use "=Sheet1!$A:$B,Sheet1!$1:$2". When this parameter is set, SheetIndex, Left, Top, Right and Bottom properties have no meaning. Note that with relative references, we always consider "A1" to be the cell where the name is. This means that the formula: "=$A$1 + A1" when evaluated in Cell B8, will read "=$A$1 + B8". To provide a negative offset, you need to wrap the formula. For example "=A1048575" will evaluate to B7 when evaluated in B8. |
Hidden | True if the range is hidden. |
Function | True if the range is a function. |
VisualBasicProc | True if the range is a Visual Basic Procedure |
Proc | True if the range is a function on a macro sheet. |
CalcExp | True if the range contains a complex function. |
BuiltIn | True if the range is a built in name. Built in names are 1 char long. |
FunctionGroup | Specifies the function group index if the defined name refers to a function. The function group defines the general category for the function. This attribute is used when there is an add-in or other code project associated with the file. |
PublishToServer | Indicates whether the defined name is included in the version of the workbook that is published to or rendered on a Web or application server. This is new to Excel 2007. |
WorkbookParameter | Indicates that the name is used as a workbook parameter on a version of the workbook that is published to or rendered on a Web or application server. This is new to Excel 2007. |
Comment | Returns the comment associated with the name, if there is one. Comments are only available in Excel 2007, but they are saved too in xls file format. |