public WorkSheetHandle getWorkSheet(String handstr)
throws WorkSheetNotFoundException{
if(sheethandles.get(handstr)!=null){
if(mybook.getWorkSheetByName(handstr)!=null)
return (WorkSheetHandle)sheethandles.get(handstr);
else throw new WorkSheetNotFoundException(handstr + " not found");
}
if(myfactory != null){
Boundsheet bs = mybook.getWorkSheetByName(handstr);
if(bs != null){
bs.setWorkBook(this.mybook);
WorkSheetHandle ret = new WorkSheetHandle(bs, this);
sheethandles.put(handstr, ret);
return ret;
}else{
throw new WorkSheetNotFoundException(handstr);
}
}
throw new WorkSheetNotFoundException("Cannot find WorkSheet " + handstr);
}