TXlsNamedRange Record
An Excel named range.
Syntax
Unit: FlexCel.Core
TXlsNamedRange = record;
Fields
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 FunctionDef. 04. Name is a VB procedure. If set you also need to set 08 (name is a macro). Corresponds to the property...[more] |
Top | Top of the range. |
Left | Left of the range. |
Bottom | Bottom of the range. |
Right | Right of the range. |
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. |
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. |
Methods
Name | Description |
---|---|
Create | Overloaded Create Create(string, Integer, Integer, string) Create(string, Integer, Integer, Integer, Integer, Integer, Integer, string) Create(string, Integer, Integer, Integer, Integer, Integer, Integer, Integer) Create(string, Integer, Integer, Integer, Integer, Integer, Integer, Integer, string) Create(string, Integer, Integer, Integer, Integer, Integer, Integer, Integer, string, string) |
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. |
IsNull | Returns true if the record doesn't have a defined value. |
HasValue | Returns true if the record has a defined value. This is the inverse of IsNull |
Null | Creates an invalid Cell range with all coordinates being negative. |
Operators
Name | Description |
---|---|
Equality | Adapts the = operator so it returns true when both instances have the same values. |
Inequality | Adapts the <> operator so it returns true when both instances have different values. |
Explicit Conversion | Converts from TXlsNamedRange instances to TXlsCellRange instances when you do an explicit cast. |
Properties
Name | Description |
---|---|
Hidden | True if the range is hidden. |
FunctionDef | 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. |
CellRef | Gets or sets the string that defines the 2D-range in A1 notation. |