Top Description Inners Fields Constructors Methods
org.apache.poi.hssf.record

public final Class NameRecord

extends ContinuableRecord
Class Inheritance
Annotations
@SuppressWarnings:unused
Imports
java.util.Collections, .LinkedHashMap, .Map, java.util.function.Supplier, org.apache.poi.hssf.record.cont.ContinuableRecord, .ContinuableRecordOutput, org.apache.poi.ss.formula.Formula, org.apache.poi.ss.formula.ptg.Area3DPtg, .Ptg, .Ref3DPtg, org.apache.poi.util.LittleEndianByteArrayInputStream, .LittleEndianInput, .StringUtil

Defines a named range within a workbook.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public static final byte
BUILTIN_AUTO_ACTIVATE

Included for completeness sake, not implemented

public static final byte
BUILTIN_AUTO_CLOSE

Included for completeness sake, not implemented

public static final byte
BUILTIN_AUTO_DEACTIVATE

Included for completeness sake, not implemented

public static final byte
BUILTIN_AUTO_OPEN

Included for completeness sake, not implemented

public static final byte
BUILTIN_CONSOLIDATE_AREA

Included for completeness sake, not implemented

public static final byte
BUILTIN_CRITERIA

Included for completeness sake, not implemented

public static final byte
BUILTIN_DATA_FORM

Included for completeness sake, not implemented

public static final byte
BUILTIN_DATABASE

Included for completeness sake, not implemented

public static final byte
public static final byte
public static final byte
public static final byte
BUILTIN_RECORDER

Included for completeness sake, not implemented

public static final byte
BUILTIN_SHEET_TITLE

Included for completeness sake, not implemented

private boolean
private byte
private String
private Formula
private String
private String
private String
private String
private short
private byte
private short
field_5_externSheetIndex_plus1

One-based extern index of sheet (resolved via LinkTable).

private int
field_6_sheetNumber

the one based sheet number.

public static final short

Constructor Summary

AccessConstructor and Description
public
NameRecord()

Creates new NameRecord

public
public
NameRecord(byte
Built-in byte representation for the name record, use the public constants
builtin
,
int
the sheet which the name applies to
sheetNumber
)

Constructor to create a built-in named region

public
NameRecord(RecordInputStream
the RecordInputstream to read the record from
ris
)

called by the constructor, should set class level fields.

Method Summary

Modifier and TypeMethod and Description
public NameRecord
public byte

Returns:

the built in Name
getBuiltInName
()

Gets the Built In Name

public String

Returns:

custom menu text
getCustomMenuText
()

get the custom menu text

pack-priv int
public String

Returns:

description text
getDescriptionText
()

gets the description text

public int

Returns:

extern sheet index
getExternSheetNumber
()

gets the extern sheet number

public byte

Returns:

function group
getFnGroup
()

public Map<String, Supplier<?>>
public HSSFRecordTypes
public String

Returns:

gelp topic text
getHelpTopicText
()

get the help topic text

public byte

Returns:

keyboard shortcut
getKeyboardShortcut
()

returns the keyboard shortcut

public Ptg[]

Returns:

the name formula. never null
getNameDefinition
()

gets the definition, reference (Formula)

private int
public String

Returns:

name
getNameText
()

gets the name

private int

Returns:

name length
getNameTextLength
()

gets the name length, in characters

public short

Returns:

option flag
getOptionFlag
()

gets the option flag

public int

Returns:

the 1-based sheet number.
getSheetNumber
()

For named ranges, and built-in names

public short
getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

public String

Returns:

status bar text
getStatusBarText
()

gets the status bar text

public boolean

Returns:

true if name has a formula (named range or defined value)
hasFormula
()

public boolean

Returns:

true, if the name is a built-in name
isBuiltInName
()

Convenience Function to determine if the name is a built-in name

public boolean

Returns:

true if name is a command
isCommandName
()

public boolean

Returns:

true if array formula or user defined
isComplexFunction
()

public boolean

Returns:

true if name is a function
isFunctionName
()

public boolean

Returns:

true if name is hidden
isHiddenName
()

public boolean

Returns:

true if function macro or command macro
isMacro
()

public void
serialize(ContinuableRecordOutput
a data output stream
out
)

Implements abstract org.apache.poi.hssf.record.cont.ContinuableRecord.serialize.

NameRecord can span into

public void
setCustomMenuText(String
custom menu text
text
)

sets the custom menu text

public void
setDescriptionText(String
the description text
text
)

sets the description text

public void
setFunction(boolean
true indicates the name refers to a function.
function
)

Indicates that the defined name refers to a user-defined function.

public void
setHelpTopicText(String
help topix text
text
)

sets the help topic text

public void
setHidden(boolean b)

public void
setKeyboardShortcut(byte
keyboard shortcut
shortcut
)

sets the keyboard shortcut

public void
public void
setNameText(String
named range name
name
)

sets the name of the named range

public void
setOptionFlag(short
option flag
flag
)

sets the option flag for the named range

public void
setSheetNumber(int value)

public void
setStatusBarText(String
status bar text
text
)

sets the status bar text

private static String

Returns:

Unknown if the built-in name cannot be translated
translateBuiltInName
(byte name)

Creates a human readable name for built in types

Inherited from org.apache.poi.hssf.record.cont.ContinuableRecord:
getRecordSizeserialize

Field Detail

BUILTIN_AUTO_ACTIVATEback to summary
public static final byte BUILTIN_AUTO_ACTIVATE

Included for completeness sake, not implemented

BUILTIN_AUTO_CLOSEback to summary
public static final byte BUILTIN_AUTO_CLOSE

Included for completeness sake, not implemented

BUILTIN_AUTO_DEACTIVATEback to summary
public static final byte BUILTIN_AUTO_DEACTIVATE

Included for completeness sake, not implemented

BUILTIN_AUTO_OPENback to summary
public static final byte BUILTIN_AUTO_OPEN

Included for completeness sake, not implemented

BUILTIN_CONSOLIDATE_AREAback to summary
public static final byte BUILTIN_CONSOLIDATE_AREA

Included for completeness sake, not implemented

BUILTIN_CRITERIAback to summary
public static final byte BUILTIN_CRITERIA

Included for completeness sake, not implemented

BUILTIN_DATA_FORMback to summary
public static final byte BUILTIN_DATA_FORM

Included for completeness sake, not implemented

BUILTIN_DATABASEback to summary
public static final byte BUILTIN_DATABASE

Included for completeness sake, not implemented

BUILTIN_FILTER_DBback to summary
public static final byte BUILTIN_FILTER_DB
BUILTIN_PRINT_AREAback to summary
public static final byte BUILTIN_PRINT_AREA
BUILTIN_PRINT_TITLEback to summary
public static final byte BUILTIN_PRINT_TITLE
BUILTIN_RECORDERback to summary
public static final byte BUILTIN_RECORDER

Included for completeness sake, not implemented

BUILTIN_SHEET_TITLEback to summary
public static final byte BUILTIN_SHEET_TITLE

Included for completeness sake, not implemented

field_11_nameIsMultibyteback to summary
private boolean field_11_nameIsMultibyte
field_12_built_in_codeback to summary
private byte field_12_built_in_code
field_12_name_textback to summary
private String field_12_name_text
field_13_name_definitionback to summary
private Formula field_13_name_definition
field_14_custom_menu_textback to summary
private String field_14_custom_menu_text
field_15_description_textback to summary
private String field_15_description_text
field_16_help_topic_textback to summary
private String field_16_help_topic_text
field_17_status_bar_textback to summary
private String field_17_status_bar_text
field_1_option_flagback to summary
private short field_1_option_flag
field_2_keyboard_shortcutback to summary
private byte field_2_keyboard_shortcut
field_5_externSheetIndex_plus1back to summary
private short field_5_externSheetIndex_plus1

One-based extern index of sheet (resolved via LinkTable). Zero if this is a global name

field_6_sheetNumberback to summary
private int field_6_sheetNumber

the one based sheet number.

sidback to summary
public static final short sid

Constructor Detail

NameRecordback to summary
public NameRecord()

Creates new NameRecord

NameRecordback to summary
public NameRecord(NameRecord other)
NameRecordback to summary
public NameRecord(byte builtin, int sheetNumber)

Constructor to create a built-in named region

Parameters
builtin:byte

Built-in byte representation for the name record, use the public constants

sheetNumber:int

the sheet which the name applies to

NameRecordback to summary
public NameRecord(RecordInputStream ris)

called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.

Parameters
ris:RecordInputStream

the RecordInputstream to read the record from

Method Detail

copyback to summary
public NameRecord copy()

Implements abstract org.apache.poi.hssf.record.Record.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:NameRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
getBuiltInNameback to summary
public byte getBuiltInName()

Gets the Built In Name

Returns:byte

the built in Name

getCustomMenuTextback to summary
public String getCustomMenuText()

get the custom menu text

Returns:String

custom menu text

getDataSizeback to summary
pack-priv int getDataSize()
getDescriptionTextback to summary
public String getDescriptionText()

gets the description text

Returns:String

description text

getExternSheetNumberback to summary
public int getExternSheetNumber()

gets the extern sheet number

Returns:int

extern sheet index

getFnGroupback to summary
public byte getFnGroup()
Returns:byte

function group

See Also
FnGroupCountRecord
getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericRecordTypeback to summary
public HSSFRecordTypes getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Implements abstract org.apache.poi.hssf.record.Record.getGenericRecordType.

Annotations
@Override
getHelpTopicTextback to summary
public String getHelpTopicText()

get the help topic text

Returns:String

gelp topic text

getKeyboardShortcutback to summary
public byte getKeyboardShortcut()

returns the keyboard shortcut

Returns:byte

keyboard shortcut

getNameDefinitionback to summary
public Ptg[] getNameDefinition()

gets the definition, reference (Formula)

Returns:Ptg[]

the name formula. never null

getNameRawSizeback to summary
private int getNameRawSize()
getNameTextback to summary
public String getNameText()

gets the name

Returns:String

name

getNameTextLengthback to summary
private int getNameTextLength()

gets the name length, in characters

Returns:int

name length

getOptionFlagback to summary
public short getOptionFlag()

gets the option flag

Returns:short

option flag

getSheetNumberback to summary
public int getSheetNumber()

For named ranges, and built-in names

Returns:int

the 1-based sheet number.

getSidback to summary
public short getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

Returns:short

Doc from org.apache.poi.hssf.record.Record.getSid.

he id for this record

Annotations
@Override
getStatusBarTextback to summary
public String getStatusBarText()

gets the status bar text

Returns:String

status bar text

hasFormulaback to summary
public boolean hasFormula()
Returns:boolean

true if name has a formula (named range or defined value)

isBuiltInNameback to summary
public boolean isBuiltInName()

Convenience Function to determine if the name is a built-in name

Returns:boolean

true, if the name is a built-in name

isCommandNameback to summary
public boolean isCommandName()
Returns:boolean

true if name is a command

isComplexFunctionback to summary
public boolean isComplexFunction()
Returns:boolean

true if array formula or user defined

isFunctionNameback to summary
public boolean isFunctionName()
Returns:boolean

true if name is a function

isHiddenNameback to summary
public boolean isHiddenName()
Returns:boolean

true if name is hidden

isMacroback to summary
public boolean isMacro()
Returns:boolean

true if function macro or command macro

serializeback to summary
public void serialize(ContinuableRecordOutput out)

Implements abstract org.apache.poi.hssf.record.cont.ContinuableRecord.serialize.

NameRecord can span into

Parameters
out:ContinuableRecordOutput

a data output stream

Annotations
@Override
setCustomMenuTextback to summary
public void setCustomMenuText(String text)

sets the custom menu text

Parameters
text:String

custom menu text

setDescriptionTextback to summary
public void setDescriptionText(String text)

sets the description text

Parameters
text:String

the description text

setFunctionback to summary
public void setFunction(boolean function)

Indicates that the defined name refers to a user-defined function. This attribute is used when there is an add-in or other code project associated with the file.

Parameters
function:boolean

true indicates the name refers to a function.

setHelpTopicTextback to summary
public void setHelpTopicText(String text)

sets the help topic text

Parameters
text:String

help topix text

setHiddenback to summary
public void setHidden(boolean b)
setKeyboardShortcutback to summary
public void setKeyboardShortcut(byte shortcut)

sets the keyboard shortcut

Parameters
shortcut:byte

keyboard shortcut

setNameDefinitionback to summary
public void setNameDefinition(Ptg[] ptgs)
setNameTextback to summary
public void setNameText(String name)

sets the name of the named range

Parameters
name:String

named range name

setOptionFlagback to summary
public void setOptionFlag(short flag)

sets the option flag for the named range

Parameters
flag:short

option flag

setSheetNumberback to summary
public void setSheetNumber(int value)
setStatusBarTextback to summary
public void setStatusBarText(String text)

sets the status bar text

Parameters
text:String

status bar text

translateBuiltInNameback to summary
private static String translateBuiltInName(byte name)

Creates a human readable name for built in types

Returns:String

Unknown if the built-in name cannot be translated

org.apache.poi.hssf.record back to summary

private final Class NameRecord.Option

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean
isFormula(int optValue)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

OPT_BINDATAback to summary
public static final int OPT_BINDATA
OPT_BUILTINback to summary
public static final int OPT_BUILTIN
OPT_COMMAND_NAMEback to summary
public static final int OPT_COMMAND_NAME
OPT_COMPLEXback to summary
public static final int OPT_COMPLEX
OPT_FUNCTION_NAMEback to summary
public static final int OPT_FUNCTION_NAME
OPT_HIDDEN_NAMEback to summary
public static final int OPT_HIDDEN_NAME
OPT_MACROback to summary
public static final int OPT_MACRO

Constructor Detail

Optionback to summary
private Option()

Method Detail

isFormulaback to summary
public static boolean isFormula(int optValue)