Tag
public class NameTag extends BaseTag
A NameTag
indicates an association between an Excel named
range and a JETT formula. Instead of the JETT formula being transformed into
an Excel formula in the cell in which it's located, it will instead be
applied to the specified named range. JETT does not verify that the
dynamically generated expression is a valid Excel Formula. A
NameTag
must be bodiless.
BaseTag
.String
boolean
String
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ATTR_FORMULA |
Attribute that specifies the JETT formula to be applied to the named
range.
|
static java.lang.String |
ATTR_NAME |
Attribute that specifies the name of the named range.
|
static java.lang.String |
ATTR_PREFER_WORKBOOK_SCOPE |
Attribute that specifies whether to prefer a named range with workbook
scope over a same-named named range with sheet scope.
|
static java.util.List<java.lang.String> |
EXCEL_BUILT_IN_NAMES |
A list of Excel built-in named range names.
|
ATTR_ON_PROCESSED, SPEC_SEP
Constructor | Description |
---|---|
NameTag() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getName() |
Returns this
Tag's name. |
protected java.util.List<java.lang.String> |
getOptionalAttributes() |
Returns a
List of optional attribute names. |
protected java.util.List<java.lang.String> |
getRequiredAttributes() |
Returns a
List of required attribute names. |
boolean |
process() |
There should be a JETT formula in the formula map, keyed by the
location of this tag, referring to the JETT formula.
|
void |
validateAttributes() |
Validates the attributes for this
Tag . |
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getLocation, getParentTag, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setParentTag, setWorkbookContext
public static final java.util.List<java.lang.String> EXCEL_BUILT_IN_NAMES
setRepeatingRows
and
setRepeatingColumns
. This is a blacklist JETT uses to
bypass copying built-in names when cloning sheets.public static final java.lang.String ATTR_NAME
public static final java.lang.String ATTR_PREFER_WORKBOOK_SCOPE
false
, to prefer sheet scope over workbook scope.public static final java.lang.String ATTR_FORMULA
$[
and ]
as
normal for JETT formulas.public java.lang.String getName()
Tag's
name.Tag's
name.protected java.util.List<java.lang.String> getRequiredAttributes()
List
of required attribute names.getRequiredAttributes
in class BaseTag
List
of required attribute names.protected java.util.List<java.lang.String> getOptionalAttributes()
List
of optional attribute names.getOptionalAttributes
in class BaseTag
List
of optional attribute names.public void validateAttributes() throws TagParseException
Tag
. The "name"
attribute must refer to an existing Excel named range name. The
"formula" must be a JETT formula.validateAttributes
in class BaseTag
TagParseException
- If the attribute values are illegal or
unacceptable.public boolean process()
There should be a JETT formula in the formula map, keyed by the location of this tag, referring to the JETT formula. Replace the key with a different key based on the named range instead.
Copyright © 2012–2018 Jett Team. All rights reserved.