Browse Source

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
tags/before_ooxml_3rd_edition
Nick Burch 4 years ago
parent
commit
248e85dbba

+ 10
- 0
src/java/org/apache/poi/hssf/usermodel/HSSFName.java 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() +

+ 8
- 0
src/java/org/apache/poi/ss/usermodel/Name.java 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.
*

+ 10
- 0
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFName.java 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.
*

Loading…
Cancel
Save