View | Details | Raw Unified | Return to bug 17759
Collapse All | Expand All

(-)java/org/apache/poi/hssf/model/Workbook.java (+8 lines)
Line 2077 Link Here
2077
  	/**
2078
  	 * change the selected(displayed) sheet number
2079
  	 * @param num sheet number
2080
  	 */
2081
  	public void setSelectedSheetNum(short num){
2082
  		WindowOneRecord rec = (WindowOneRecord)findFirstRecordBySid(WindowOneRecord.sid);
2083
  		rec.setSelectedTab(num);
2084
  	}
(-)java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (+17 lines)
Line 1051 Link Here
1051
 	/**
1052
 	 * Sets selected sheet's name
1053
 	 * @param name sheet's name
1054
 	 */
1055
 	public void setSelectedSheet(String name){
1056
 		setSelectedSheetAt((short)getSheetIndex(name));
1057
 	}
1058
1059
 	/**
1060
 	 * Sets selected sheet's number
1061
 	 * @param num sheet's number
1062
 	 */
1063
 	public void setSelectedSheetAt(short num){
1064
 		if(num < 0 || num >= getNumberOfSheets())
1065
 			return;
1066
 		getWorkbook().setSelectedSheetNum(num);
1067
 	}

Return to bug 17759