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:
Nick Burch 2020-04-19 15:23:32 +00:00
parent 2841f3cd0e
commit 248e85dbba
3 changed files with 28 additions and 0 deletions

View File

@ -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() +

View File

@ -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.
*

View File

@ -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.
*