mirror of https://github.com/apache/poi.git
Inspired by Stackoverflow #61292598 - Expose if a Named Range is hidden or not
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2841f3cd0e
commit
248e85dbba
|
@ -264,6 +264,16 @@ public final class HSSFName implements Name {
|
|||
return _definedNameRec.isFunctionName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this name is hidden, eg one of the built-in Excel
|
||||
* internal names
|
||||
*
|
||||
* @return true if this name is a hidden one
|
||||
*/
|
||||
public boolean isHidden() {
|
||||
return _definedNameRec.isHiddenName();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getClass().getName() + " [" +
|
||||
_definedNameRec.getNameText() +
|
||||
|
|
|
@ -158,6 +158,14 @@ public interface Name {
|
|||
*/
|
||||
boolean isDeleted();
|
||||
|
||||
/**
|
||||
* Checks if this name is hidden, eg one of the built-in Excel
|
||||
* internal names
|
||||
*
|
||||
* @return <code>true</code> if the name is a hidden name, <code>false</code> otherwise
|
||||
*/
|
||||
boolean isHidden();
|
||||
|
||||
/**
|
||||
* Tell Excel that this name applies to the worksheet with the specified index instead of the entire workbook.
|
||||
*
|
||||
|
|
|
@ -305,6 +305,16 @@ public final class XSSFName implements Name {
|
|||
return getFunction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this name is hidden, eg one of the built-in Excel
|
||||
* internal names
|
||||
*
|
||||
* @return true if this name is a hidden one
|
||||
*/
|
||||
public boolean isHidden() {
|
||||
return _ctName.getHidden();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the comment the user provided when the name was created.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue