Skip to content

Commit a5918f2

Browse files
committed
Update javadoc for bug 56129
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702805 13f79535-47bb-0310-9956-ffa450edef68
1 parent f49f548 commit a5918f2

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/java/org/apache/poi/ss/usermodel/Workbook.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,10 @@ public interface Workbook extends Closeable {
551551
boolean isSheetVeryHidden(int sheetIx);
552552

553553
/**
554-
* Hide or unhide a sheet
554+
* Hide or unhide a sheet.
555+
*
556+
* Please note that the sheet currently set as active sheet (sheet 0 in a newly
557+
* created workbook or the one set via setActiveSheet()) cannot be hidden.
555558
*
556559
* @param sheetIx the sheet index (0-based)
557560
* @param hidden True to mark the sheet as hidden, false otherwise
@@ -566,6 +569,10 @@ public interface Workbook extends Closeable {
566569
* <li>1 - hidden. </li>
567570
* <li>2 - very hidden.</li>
568571
* </ul>
572+
*
573+
* Please note that the sheet currently set as active sheet (sheet 0 in a newly
574+
* created workbook or the one set via setActiveSheet()) cannot be hidden.
575+
*
569576
* @param sheetIx the sheet index (0-based)
570577
* @param hidden one of the following <code>Workbook</code> constants:
571578
* <code>Workbook.SHEET_STATE_VISIBLE</code>,

src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,9 @@ public boolean isSheetVeryHidden(int sheetIx)
11871187

11881188
/**
11891189
* Hide or unhide a sheet
1190+
*
1191+
* Please note that the sheet currently set as active sheet (sheet 0 in a newly
1192+
* created workbook or the one set via setActiveSheet()) cannot be hidden.
11901193
*
11911194
* @param sheetIx the sheet index (0-based)
11921195
* @param hidden True to mark the sheet as hidden, false otherwise
@@ -1205,6 +1208,10 @@ public void setSheetHidden(int sheetIx, boolean hidden)
12051208
* <li>1 - hidden. </li>
12061209
* <li>2 - very hidden.</li>
12071210
* </ul>
1211+
*
1212+
* Please note that the sheet currently set as active sheet (sheet 0 in a newly
1213+
* created workbook or the one set via setActiveSheet()) cannot be hidden.
1214+
*
12081215
* @param sheetIx the sheet index (0-based)
12091216
* @param hidden one of the following <code>Workbook</code> constants:
12101217
* <code>Workbook.SHEET_STATE_VISIBLE</code>,

src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,9 @@ public boolean isSheetVeryHidden(int sheetIx) {
17141714
* Calling <code>setSheetHidden(sheetIndex, false)</code> is equivalent to
17151715
* <code>setSheetHidden(sheetIndex, Workbook.SHEET_STATE_VISIBLE)</code>.
17161716
* </p>
1717+
*
1718+
* Please note that the sheet currently set as active sheet (sheet 0 in a newly
1719+
* created workbook or the one set via setActiveSheet()) cannot be hidden.
17171720
*
17181721
* @param sheetIx the 0-based index of the sheet
17191722
* @param hidden whether this sheet is hidden
@@ -1732,6 +1735,10 @@ public void setSheetHidden(int sheetIx, boolean hidden) {
17321735
* <li>1 - hidden. </li>
17331736
* <li>2 - very hidden.</li>
17341737
* </ul>
1738+
*
1739+
* Please note that the sheet currently set as active sheet (sheet 0 in a newly
1740+
* created workbook or the one set via setActiveSheet()) cannot be hidden.
1741+
*
17351742
* @param sheetIx the sheet index (0-based)
17361743
* @param state one of the following <code>Workbook</code> constants:
17371744
* <code>Workbook.SHEET_STATE_VISIBLE</code>,

0 commit comments

Comments
 (0)